mcp-grampsweb 1.2.1 → 1.3.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/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- package/dist/tools/convenience.d.ts +119 -0
- package/dist/tools/convenience.d.ts.map +1 -1
- package/dist/tools/convenience.js +234 -0
- package/dist/tools/convenience.js.map +1 -1
- package/dist/tools/create.d.ts +4 -0
- package/dist/tools/create.d.ts.map +1 -1
- package/dist/tools/create.js +2 -1
- package/dist/tools/create.js.map +1 -1
- package/dist/tools/delete.d.ts +79 -0
- package/dist/tools/delete.d.ts.map +1 -0
- package/dist/tools/delete.js +159 -0
- package/dist/tools/delete.js.map +1 -0
- package/dist/tools/index.d.ts +211 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/tags.d.ts +131 -0
- package/dist/tools/tags.d.ts.map +1 -0
- package/dist/tools/tags.js +296 -0
- package/dist/tools/tags.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/response.d.ts +1 -1
- package/dist/utils/response.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity deletion tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
declare const deleteEntitySchema: z.ZodObject<{
|
|
6
|
+
entity_type: z.ZodString;
|
|
7
|
+
handle: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
entity_type: string;
|
|
10
|
+
handle: string;
|
|
11
|
+
}, {
|
|
12
|
+
entity_type: string;
|
|
13
|
+
handle: string;
|
|
14
|
+
}>;
|
|
15
|
+
declare const deleteBatchSchema: z.ZodObject<{
|
|
16
|
+
entity_type: z.ZodString;
|
|
17
|
+
handles: z.ZodArray<z.ZodString, "many">;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
entity_type: string;
|
|
20
|
+
handles: string[];
|
|
21
|
+
}, {
|
|
22
|
+
entity_type: string;
|
|
23
|
+
handles: string[];
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete a single entity
|
|
27
|
+
*/
|
|
28
|
+
export declare function grampsDelete(params: z.infer<typeof deleteEntitySchema>): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete multiple entities of the same type
|
|
31
|
+
*/
|
|
32
|
+
export declare function grampsDeleteBatch(params: z.infer<typeof deleteBatchSchema>): Promise<string>;
|
|
33
|
+
export declare const deleteTools: {
|
|
34
|
+
gramps_delete: {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object";
|
|
39
|
+
properties: {
|
|
40
|
+
entity_type: {
|
|
41
|
+
type: string;
|
|
42
|
+
enum: string[];
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
handle: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
handler: typeof grampsDelete;
|
|
53
|
+
};
|
|
54
|
+
gramps_delete_batch: {
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: "object";
|
|
59
|
+
properties: {
|
|
60
|
+
entity_type: {
|
|
61
|
+
type: string;
|
|
62
|
+
enum: string[];
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
handles: {
|
|
66
|
+
type: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
handler: typeof grampsDeleteBatch;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/tools/delete.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,QAAA,MAAM,kBAAkB;;;;;;;;;EAOtB,CAAC;AAGH,QAAA,MAAM,iBAAiB;;;;;;;;;EAOrB,CAAC;AAEH;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACzC,OAAO,CAAC,MAAM,CAAC,CAwBjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CA6CjB;AAGD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEvB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity deletion tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { grampsClient } from "../client.js";
|
|
6
|
+
import { ENTITY_ENDPOINT_MAP } from "../constants.js";
|
|
7
|
+
import { formatToolResponse } from "../utils/response.js";
|
|
8
|
+
// Schema for deleting a single entity
|
|
9
|
+
const deleteEntitySchema = z.object({
|
|
10
|
+
entity_type: z
|
|
11
|
+
.string()
|
|
12
|
+
.describe("Entity type: people, families, events, places, sources, citations, repositories, media, notes, tags"),
|
|
13
|
+
handle: z.string().describe("Handle of the entity to delete"),
|
|
14
|
+
});
|
|
15
|
+
// Schema for batch deleting entities
|
|
16
|
+
const deleteBatchSchema = z.object({
|
|
17
|
+
entity_type: z
|
|
18
|
+
.string()
|
|
19
|
+
.describe("Entity type: people, families, events, places, sources, citations, repositories, media, notes, tags"),
|
|
20
|
+
handles: z.array(z.string()).min(1).describe("Array of handles to delete"),
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Delete a single entity
|
|
24
|
+
*/
|
|
25
|
+
export async function grampsDelete(params) {
|
|
26
|
+
const { entity_type, handle } = deleteEntitySchema.parse(params);
|
|
27
|
+
// Validate entity type
|
|
28
|
+
const endpoint = ENTITY_ENDPOINT_MAP[entity_type.toLowerCase()];
|
|
29
|
+
if (!endpoint) {
|
|
30
|
+
throw new Error(`Invalid entity type "${entity_type}". Valid types: people, families, events, places, sources, citations, repositories, media, notes, tags`);
|
|
31
|
+
}
|
|
32
|
+
// Delete the entity
|
|
33
|
+
await grampsClient.delete(`${endpoint}${handle}`);
|
|
34
|
+
return formatToolResponse({
|
|
35
|
+
status: "success",
|
|
36
|
+
summary: `Deleted ${entity_type.replace(/s$/, "")} ${handle}`,
|
|
37
|
+
data: {
|
|
38
|
+
entity_type,
|
|
39
|
+
handle,
|
|
40
|
+
deleted: true,
|
|
41
|
+
},
|
|
42
|
+
details: `Successfully deleted the ${entity_type.replace(/s$/, "")} record.`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Delete multiple entities of the same type
|
|
47
|
+
*/
|
|
48
|
+
export async function grampsDeleteBatch(params) {
|
|
49
|
+
const { entity_type, handles } = deleteBatchSchema.parse(params);
|
|
50
|
+
// Validate entity type
|
|
51
|
+
const endpoint = ENTITY_ENDPOINT_MAP[entity_type.toLowerCase()];
|
|
52
|
+
if (!endpoint) {
|
|
53
|
+
throw new Error(`Invalid entity type "${entity_type}". Valid types: people, families, events, places, sources, citations, repositories, media, notes, tags`);
|
|
54
|
+
}
|
|
55
|
+
const results = [];
|
|
56
|
+
// Delete each entity
|
|
57
|
+
for (const handle of handles) {
|
|
58
|
+
try {
|
|
59
|
+
await grampsClient.delete(`${endpoint}${handle}`);
|
|
60
|
+
results.push({ handle, success: true });
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
results.push({
|
|
64
|
+
handle,
|
|
65
|
+
success: false,
|
|
66
|
+
error: error instanceof Error ? error.message : String(error),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const successCount = results.filter((r) => r.success).length;
|
|
71
|
+
const failCount = results.filter((r) => !r.success).length;
|
|
72
|
+
return formatToolResponse({
|
|
73
|
+
status: failCount === 0 ? "success" : successCount === 0 ? "error" : "partial",
|
|
74
|
+
summary: `Deleted ${successCount}/${handles.length} ${entity_type}`,
|
|
75
|
+
data: {
|
|
76
|
+
entity_type,
|
|
77
|
+
total: handles.length,
|
|
78
|
+
deleted: successCount,
|
|
79
|
+
failed: failCount,
|
|
80
|
+
results,
|
|
81
|
+
},
|
|
82
|
+
details: failCount === 0
|
|
83
|
+
? `Successfully deleted all ${successCount} records.`
|
|
84
|
+
: `Deleted ${successCount} records, ${failCount} failed.`,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Tool definitions for MCP
|
|
88
|
+
export const deleteTools = {
|
|
89
|
+
gramps_delete: {
|
|
90
|
+
name: "gramps_delete",
|
|
91
|
+
description: "Delete a single entity from the database. " +
|
|
92
|
+
"REQUIRED: entity_type and handle. " +
|
|
93
|
+
"SUPPORTED TYPES: people, families, events, places, sources, citations, repositories, media, notes, tags. " +
|
|
94
|
+
"WARNING: This permanently removes the record.",
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
entity_type: {
|
|
99
|
+
type: "string",
|
|
100
|
+
enum: [
|
|
101
|
+
"people",
|
|
102
|
+
"families",
|
|
103
|
+
"events",
|
|
104
|
+
"places",
|
|
105
|
+
"sources",
|
|
106
|
+
"citations",
|
|
107
|
+
"repositories",
|
|
108
|
+
"media",
|
|
109
|
+
"notes",
|
|
110
|
+
"tags",
|
|
111
|
+
],
|
|
112
|
+
description: "Type of entity to delete",
|
|
113
|
+
},
|
|
114
|
+
handle: {
|
|
115
|
+
type: "string",
|
|
116
|
+
description: "Handle of the entity to delete",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: ["entity_type", "handle"],
|
|
120
|
+
},
|
|
121
|
+
handler: grampsDelete,
|
|
122
|
+
},
|
|
123
|
+
gramps_delete_batch: {
|
|
124
|
+
name: "gramps_delete_batch",
|
|
125
|
+
description: "Delete multiple entities of the same type. " +
|
|
126
|
+
"REQUIRED: entity_type and handles array. " +
|
|
127
|
+
"USE FOR: Cleaning up test data or bulk deletions. " +
|
|
128
|
+
"RETURNS: Count of successful and failed deletions.",
|
|
129
|
+
inputSchema: {
|
|
130
|
+
type: "object",
|
|
131
|
+
properties: {
|
|
132
|
+
entity_type: {
|
|
133
|
+
type: "string",
|
|
134
|
+
enum: [
|
|
135
|
+
"people",
|
|
136
|
+
"families",
|
|
137
|
+
"events",
|
|
138
|
+
"places",
|
|
139
|
+
"sources",
|
|
140
|
+
"citations",
|
|
141
|
+
"repositories",
|
|
142
|
+
"media",
|
|
143
|
+
"notes",
|
|
144
|
+
"tags",
|
|
145
|
+
],
|
|
146
|
+
description: "Type of entities to delete",
|
|
147
|
+
},
|
|
148
|
+
handles: {
|
|
149
|
+
type: "array",
|
|
150
|
+
items: { type: "string" },
|
|
151
|
+
description: "Array of handles to delete",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ["entity_type", "handles"],
|
|
155
|
+
},
|
|
156
|
+
handler: grampsDeleteBatch,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../src/tools/delete.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,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EAAE,YAAY;KACtB;IAED,mBAAmB,EAAE;QACnB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,6CAA6C;YAC7C,2CAA2C;YAC3C,oDAAoD;YACpD,oDAAoD;QACtD,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE;wBACJ,QAAQ;wBACR,UAAU;wBACV,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,WAAW;wBACX,cAAc;wBACd,OAAO;wBACP,OAAO;wBACP,MAAM;qBACP;oBACD,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,4BAA4B;iBAC1C;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC;SACrC;QACD,OAAO,EAAE,iBAAiB;KAC3B;CACF,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -7,7 +7,133 @@ import { analysisTools } from "./analysis.js";
|
|
|
7
7
|
import { listTools } from "./list.js";
|
|
8
8
|
import { updateTools } from "./update.js";
|
|
9
9
|
import { convenienceTools } from "./convenience.js";
|
|
10
|
+
import { deleteTools } from "./delete.js";
|
|
11
|
+
import { tagTools } from "./tags.js";
|
|
10
12
|
export declare const allTools: {
|
|
13
|
+
gramps_list_tags: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: "object";
|
|
18
|
+
properties: {};
|
|
19
|
+
required: never[];
|
|
20
|
+
};
|
|
21
|
+
handler: typeof import("./tags.js").grampsListTags;
|
|
22
|
+
};
|
|
23
|
+
gramps_create_tag: {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: "object";
|
|
28
|
+
properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
priority: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
required: string[];
|
|
43
|
+
};
|
|
44
|
+
handler: typeof import("./tags.js").grampsCreateTag;
|
|
45
|
+
};
|
|
46
|
+
gramps_tag_entity: {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object";
|
|
51
|
+
properties: {
|
|
52
|
+
entity_type: {
|
|
53
|
+
type: string;
|
|
54
|
+
enum: string[];
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
handle: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
tag_handle: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
required: string[];
|
|
67
|
+
};
|
|
68
|
+
handler: typeof import("./tags.js").grampsTagEntity;
|
|
69
|
+
};
|
|
70
|
+
gramps_untag_entity: {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: "object";
|
|
75
|
+
properties: {
|
|
76
|
+
entity_type: {
|
|
77
|
+
type: string;
|
|
78
|
+
enum: string[];
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
handle: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
tag_handle: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
required: string[];
|
|
91
|
+
};
|
|
92
|
+
handler: typeof import("./tags.js").grampsUntagEntity;
|
|
93
|
+
};
|
|
94
|
+
gramps_delete: {
|
|
95
|
+
name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object";
|
|
99
|
+
properties: {
|
|
100
|
+
entity_type: {
|
|
101
|
+
type: string;
|
|
102
|
+
enum: string[];
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
handle: {
|
|
106
|
+
type: string;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
required: string[];
|
|
111
|
+
};
|
|
112
|
+
handler: typeof import("./delete.js").grampsDelete;
|
|
113
|
+
};
|
|
114
|
+
gramps_delete_batch: {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: "object";
|
|
119
|
+
properties: {
|
|
120
|
+
entity_type: {
|
|
121
|
+
type: string;
|
|
122
|
+
enum: string[];
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
handles: {
|
|
126
|
+
type: string;
|
|
127
|
+
items: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
required: string[];
|
|
134
|
+
};
|
|
135
|
+
handler: typeof import("./delete.js").grampsDeleteBatch;
|
|
136
|
+
};
|
|
11
137
|
gramps_add_child_to_family: {
|
|
12
138
|
name: string;
|
|
13
139
|
description: string;
|
|
@@ -39,6 +165,86 @@ export declare const allTools: {
|
|
|
39
165
|
};
|
|
40
166
|
handler: typeof import("./convenience.js").grampsAddChildToFamily;
|
|
41
167
|
};
|
|
168
|
+
gramps_set_person_birth: {
|
|
169
|
+
name: string;
|
|
170
|
+
description: string;
|
|
171
|
+
inputSchema: {
|
|
172
|
+
type: "object";
|
|
173
|
+
properties: {
|
|
174
|
+
person_handle: {
|
|
175
|
+
type: string;
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
date: {
|
|
179
|
+
type: string;
|
|
180
|
+
description: string;
|
|
181
|
+
properties: {
|
|
182
|
+
dateval: {
|
|
183
|
+
type: string;
|
|
184
|
+
items: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
description: string;
|
|
188
|
+
};
|
|
189
|
+
text: {
|
|
190
|
+
type: string;
|
|
191
|
+
description: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
place_handle: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
description: {
|
|
200
|
+
type: string;
|
|
201
|
+
description: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
required: string[];
|
|
205
|
+
};
|
|
206
|
+
handler: typeof import("./convenience.js").grampsSetPersonBirth;
|
|
207
|
+
};
|
|
208
|
+
gramps_set_person_death: {
|
|
209
|
+
name: string;
|
|
210
|
+
description: string;
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: "object";
|
|
213
|
+
properties: {
|
|
214
|
+
person_handle: {
|
|
215
|
+
type: string;
|
|
216
|
+
description: string;
|
|
217
|
+
};
|
|
218
|
+
date: {
|
|
219
|
+
type: string;
|
|
220
|
+
description: string;
|
|
221
|
+
properties: {
|
|
222
|
+
dateval: {
|
|
223
|
+
type: string;
|
|
224
|
+
items: {
|
|
225
|
+
type: string;
|
|
226
|
+
};
|
|
227
|
+
description: string;
|
|
228
|
+
};
|
|
229
|
+
text: {
|
|
230
|
+
type: string;
|
|
231
|
+
description: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
place_handle: {
|
|
236
|
+
type: string;
|
|
237
|
+
description: string;
|
|
238
|
+
};
|
|
239
|
+
description: {
|
|
240
|
+
type: string;
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
required: string[];
|
|
245
|
+
};
|
|
246
|
+
handler: typeof import("./convenience.js").grampsSetPersonDeath;
|
|
247
|
+
};
|
|
42
248
|
gramps_update_person: {
|
|
43
249
|
name: string;
|
|
44
250
|
description: string;
|
|
@@ -332,6 +538,10 @@ export declare const allTools: {
|
|
|
332
538
|
type: string;
|
|
333
539
|
description: string;
|
|
334
540
|
};
|
|
541
|
+
connector: {
|
|
542
|
+
type: string;
|
|
543
|
+
description: string;
|
|
544
|
+
};
|
|
335
545
|
primary: {
|
|
336
546
|
type: string;
|
|
337
547
|
description: string;
|
|
@@ -716,5 +926,5 @@ export declare const allTools: {
|
|
|
716
926
|
};
|
|
717
927
|
};
|
|
718
928
|
export declare const toolNames: string[];
|
|
719
|
-
export { searchTools, createTools, analysisTools, listTools, updateTools, convenienceTools };
|
|
929
|
+
export { searchTools, createTools, analysisTools, listTools, updateTools, convenienceTools, deleteTools, tagTools };
|
|
720
930
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASpB,CAAC;AAGF,eAAO,MAAM,SAAS,UAAwB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { analysisTools } from "./analysis.js";
|
|
|
7
7
|
import { listTools } from "./list.js";
|
|
8
8
|
import { updateTools } from "./update.js";
|
|
9
9
|
import { convenienceTools } from "./convenience.js";
|
|
10
|
+
import { deleteTools } from "./delete.js";
|
|
11
|
+
import { tagTools } from "./tags.js";
|
|
10
12
|
// Combine all tools
|
|
11
13
|
export const allTools = {
|
|
12
14
|
...searchTools,
|
|
@@ -15,9 +17,11 @@ export const allTools = {
|
|
|
15
17
|
...listTools,
|
|
16
18
|
...updateTools,
|
|
17
19
|
...convenienceTools,
|
|
20
|
+
...deleteTools,
|
|
21
|
+
...tagTools,
|
|
18
22
|
};
|
|
19
23
|
// Export tool names for registration
|
|
20
24
|
export const toolNames = Object.keys(allTools);
|
|
21
25
|
// Export individual tool groups
|
|
22
|
-
export { searchTools, createTools, analysisTools, listTools, updateTools, convenienceTools };
|
|
26
|
+
export { searchTools, createTools, analysisTools, listTools, updateTools, convenienceTools, deleteTools, tagTools };
|
|
23
27
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,oBAAoB;AACpB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,WAAW;IACd,GAAG,WAAW;IACd,GAAG,aAAa;IAChB,GAAG,SAAS;IACZ,GAAG,WAAW;IACd,GAAG,gBAAgB;IACnB,GAAG,WAAW;IACd,GAAG,QAAQ;CACZ,CAAC;AAEF,qCAAqC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAE/C,gCAAgC;AAChC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag management tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
declare const createTagSchema: z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
color: z.ZodOptional<z.ZodString>;
|
|
8
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name: string;
|
|
11
|
+
color?: string | undefined;
|
|
12
|
+
priority?: number | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
name: string;
|
|
15
|
+
color?: string | undefined;
|
|
16
|
+
priority?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
declare const tagEntitySchema: z.ZodObject<{
|
|
19
|
+
entity_type: z.ZodString;
|
|
20
|
+
handle: z.ZodString;
|
|
21
|
+
tag_handle: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
entity_type: string;
|
|
24
|
+
handle: string;
|
|
25
|
+
tag_handle: string;
|
|
26
|
+
}, {
|
|
27
|
+
entity_type: string;
|
|
28
|
+
handle: string;
|
|
29
|
+
tag_handle: string;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* List all tags in the database
|
|
33
|
+
*/
|
|
34
|
+
export declare function grampsListTags(): Promise<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a new tag
|
|
37
|
+
*/
|
|
38
|
+
export declare function grampsCreateTag(params: z.infer<typeof createTagSchema>): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Add a tag to an entity
|
|
41
|
+
*/
|
|
42
|
+
export declare function grampsTagEntity(params: z.infer<typeof tagEntitySchema>): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Remove a tag from an entity
|
|
45
|
+
*/
|
|
46
|
+
export declare function grampsUntagEntity(params: z.infer<typeof tagEntitySchema>): Promise<string>;
|
|
47
|
+
export declare const tagTools: {
|
|
48
|
+
gramps_list_tags: {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: "object";
|
|
53
|
+
properties: {};
|
|
54
|
+
required: never[];
|
|
55
|
+
};
|
|
56
|
+
handler: typeof grampsListTags;
|
|
57
|
+
};
|
|
58
|
+
gramps_create_tag: {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object";
|
|
63
|
+
properties: {
|
|
64
|
+
name: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
color: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
priority: {
|
|
73
|
+
type: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
required: string[];
|
|
78
|
+
};
|
|
79
|
+
handler: typeof grampsCreateTag;
|
|
80
|
+
};
|
|
81
|
+
gramps_tag_entity: {
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: "object";
|
|
86
|
+
properties: {
|
|
87
|
+
entity_type: {
|
|
88
|
+
type: string;
|
|
89
|
+
enum: string[];
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
handle: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
tag_handle: {
|
|
97
|
+
type: string;
|
|
98
|
+
description: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
required: string[];
|
|
102
|
+
};
|
|
103
|
+
handler: typeof grampsTagEntity;
|
|
104
|
+
};
|
|
105
|
+
gramps_untag_entity: {
|
|
106
|
+
name: string;
|
|
107
|
+
description: string;
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object";
|
|
110
|
+
properties: {
|
|
111
|
+
entity_type: {
|
|
112
|
+
type: string;
|
|
113
|
+
enum: string[];
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
handle: {
|
|
117
|
+
type: string;
|
|
118
|
+
description: string;
|
|
119
|
+
};
|
|
120
|
+
tag_handle: {
|
|
121
|
+
type: string;
|
|
122
|
+
description: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
required: string[];
|
|
126
|
+
};
|
|
127
|
+
handler: typeof grampsUntagEntity;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export {};
|
|
131
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/tools/tags.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,eAAe;;;;;;;;;;;;EAOnB,CAAC;AAGH,QAAA,MAAM,eAAe;;;;;;;;;;;;EAMnB,CAAC;AAEH;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAgCtD;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAGD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuHpB,CAAC"}
|