@arkimedehq/recordare-client 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/tools.ts ADDED
@@ -0,0 +1,287 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright © 2026 Andrea Genovese
3
+
4
+ /**
5
+ * The MCP tools Recordare serves (name, title, description, JSON Schema of the arguments), for connectors that must
6
+ * declare tools before talking to the service. Generated by the conformance suite (service/test/conformance,
7
+ * RECORDARE_UPDATE_TOOLS=1), which fails when this copy drifts from the service.
8
+ */
9
+ export const TOOLS = [
10
+ {
11
+ "name": "correct_episode",
12
+ "title": "Correct a memory",
13
+ "description": "Correct a remembered episode (wrong date or detail). The old version is kept as history, never shown as current.",
14
+ "inputSchema": {
15
+ "type": "object",
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "format": "uuid",
20
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
21
+ },
22
+ "content": {
23
+ "type": "string"
24
+ },
25
+ "occurred_at": {
26
+ "type": "string",
27
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
28
+ },
29
+ "date_precision": {
30
+ "type": "string",
31
+ "enum": [
32
+ "day",
33
+ "month",
34
+ "year",
35
+ "approximate"
36
+ ]
37
+ }
38
+ },
39
+ "required": [
40
+ "id"
41
+ ],
42
+ "$schema": "http://json-schema.org/draft-07/schema#"
43
+ }
44
+ },
45
+ {
46
+ "name": "forget_episode",
47
+ "title": "Forget a memory",
48
+ "description": "Forget an episode, when asked to. It is deleted with its corrections and never recreated.",
49
+ "inputSchema": {
50
+ "type": "object",
51
+ "properties": {
52
+ "id": {
53
+ "type": "string",
54
+ "format": "uuid",
55
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
56
+ }
57
+ },
58
+ "required": [
59
+ "id"
60
+ ],
61
+ "$schema": "http://json-schema.org/draft-07/schema#"
62
+ }
63
+ },
64
+ {
65
+ "name": "learn_source",
66
+ "title": "Learn a text",
67
+ "description": "Learn a text as knowledge (a manual, a page, a note — as plain text; send it again with the same title to replace it). It stays searchable with search_knowledge; the learning becomes a memory of this conversation.",
68
+ "inputSchema": {
69
+ "type": "object",
70
+ "properties": {
71
+ "title": {
72
+ "type": "string"
73
+ },
74
+ "text": {
75
+ "type": "string"
76
+ },
77
+ "author": {
78
+ "type": "string"
79
+ },
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "document",
84
+ "page",
85
+ "note",
86
+ "book",
87
+ "own_text"
88
+ ]
89
+ },
90
+ "uri": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "required": [
95
+ "title",
96
+ "text"
97
+ ],
98
+ "$schema": "http://json-schema.org/draft-07/schema#"
99
+ }
100
+ },
101
+ {
102
+ "name": "log_episode",
103
+ "title": "Note something that happened or is planned",
104
+ "description": "Explicit capture (\"note that today I serviced the car\"). Resolve the date yourself (ISO).",
105
+ "inputSchema": {
106
+ "type": "object",
107
+ "properties": {
108
+ "content": {
109
+ "type": "string"
110
+ },
111
+ "kind": {
112
+ "type": "string",
113
+ "enum": [
114
+ "event",
115
+ "plan"
116
+ ]
117
+ },
118
+ "occurred_at": {
119
+ "type": "string",
120
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
121
+ },
122
+ "occurred_until": {
123
+ "type": "string",
124
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
125
+ },
126
+ "date_precision": {
127
+ "type": "string",
128
+ "enum": [
129
+ "day",
130
+ "month",
131
+ "year",
132
+ "approximate"
133
+ ]
134
+ },
135
+ "people": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string"
139
+ }
140
+ },
141
+ "place": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "required": [
146
+ "content"
147
+ ],
148
+ "$schema": "http://json-schema.org/draft-07/schema#"
149
+ }
150
+ },
151
+ {
152
+ "name": "remember",
153
+ "title": "Remember something",
154
+ "description": "Explicit \"remember that…\" about preferences, habits, values, knowledge.",
155
+ "inputSchema": {
156
+ "type": "object",
157
+ "properties": {
158
+ "content": {
159
+ "type": "string"
160
+ },
161
+ "category": {
162
+ "type": "string",
163
+ "enum": [
164
+ "preference",
165
+ "habit",
166
+ "value",
167
+ "relationship",
168
+ "knowledge",
169
+ "profile",
170
+ "constraint"
171
+ ]
172
+ }
173
+ },
174
+ "required": [
175
+ "content"
176
+ ],
177
+ "$schema": "http://json-schema.org/draft-07/schema#"
178
+ }
179
+ },
180
+ {
181
+ "name": "resolve_period",
182
+ "title": "Turn a period expression into dates",
183
+ "description": "Deterministic: \"questa settimana\", \"la settimana scorsa\", \"a febbraio\", \"lo scorso dicembre\", \"last week\"… → {from, to} (ISO, inclusive).",
184
+ "inputSchema": {
185
+ "type": "object",
186
+ "properties": {
187
+ "expression": {
188
+ "type": "string"
189
+ }
190
+ },
191
+ "required": [
192
+ "expression"
193
+ ],
194
+ "$schema": "http://json-schema.org/draft-07/schema#"
195
+ }
196
+ },
197
+ {
198
+ "name": "search_episodes",
199
+ "title": "Search what happened",
200
+ "description": "Search your memory of what happened: what you lived, did, planned or learned, and what happened to the people you know (events, plans, changes), with dates and status. Each item has a subject: you (written in the first person), a person by name, someone, or undecided. Use `from`/`to` (ISO dates, inclusive; see resolve_period) for questions about a period. mode: \"search\" = most relevant, \"list\" = chronological in the period (overviews, counting), \"latest\" = most recent first (\"when did I last…\").",
201
+ "inputSchema": {
202
+ "type": "object",
203
+ "properties": {
204
+ "query": {
205
+ "description": "What to look for — pass the question also when listing a period: it ranks the items and finds the matching chat excerpts",
206
+ "type": "string"
207
+ },
208
+ "from": {
209
+ "description": "Start date, ISO (YYYY-MM-DD or YYYY-MM)",
210
+ "type": "string",
211
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
212
+ },
213
+ "to": {
214
+ "description": "End date, ISO (YYYY-MM-DD or YYYY-MM), inclusive",
215
+ "type": "string",
216
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
217
+ },
218
+ "mode": {
219
+ "type": "string",
220
+ "enum": [
221
+ "search",
222
+ "list",
223
+ "latest"
224
+ ]
225
+ },
226
+ "include_plans": {
227
+ "type": "boolean"
228
+ },
229
+ "limit": {
230
+ "type": "integer",
231
+ "minimum": 1,
232
+ "maximum": 50
233
+ }
234
+ },
235
+ "$schema": "http://json-schema.org/draft-07/schema#"
236
+ }
237
+ },
238
+ {
239
+ "name": "search_knowledge",
240
+ "title": "Search what you learned",
241
+ "description": "Search the sources you learned (manuals, documents, pages, notes you were given or wrote): passages of their text, each with its source (title, author, who gave it, when) and the episodes that refer to it. For what happened, use search_episodes.",
242
+ "inputSchema": {
243
+ "type": "object",
244
+ "properties": {
245
+ "query": {
246
+ "type": "string",
247
+ "description": "What to look up"
248
+ },
249
+ "limit": {
250
+ "type": "integer",
251
+ "minimum": 1,
252
+ "maximum": 20
253
+ }
254
+ },
255
+ "required": [
256
+ "query"
257
+ ],
258
+ "$schema": "http://json-schema.org/draft-07/schema#"
259
+ }
260
+ },
261
+ {
262
+ "name": "search_memory",
263
+ "title": "Search what you know about yourself and others",
264
+ "description": "Search your memory of preferences, habits, values, relationships, knowledge and current state (car, home, job…) — yours and of the people you know; each item has its subject. Use `as_of` (ISO date) for \"what was it on that date\" questions; each fact comes with its history.",
265
+ "inputSchema": {
266
+ "type": "object",
267
+ "properties": {
268
+ "query": {
269
+ "type": "string",
270
+ "description": "Topic"
271
+ },
272
+ "as_of": {
273
+ "description": "ISO date (YYYY-MM-DD); default today",
274
+ "type": "string",
275
+ "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$"
276
+ },
277
+ "include_pending": {
278
+ "type": "boolean"
279
+ }
280
+ },
281
+ "required": [
282
+ "query"
283
+ ],
284
+ "$schema": "http://json-schema.org/draft-07/schema#"
285
+ }
286
+ }
287
+ ] as const;