@ezmodo/mcp-server 0.13.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/README.md +305 -0
- package/config/development.js +20 -0
- package/config/endpoint-map.js +351 -0
- package/config/index.js +34 -0
- package/config/production.js +18 -0
- package/config/staging.js +18 -0
- package/handlers/access.js +141 -0
- package/handlers/activity.js +112 -0
- package/handlers/agents.js +95 -0
- package/handlers/ai-intelligence.js +55 -0
- package/handlers/attachments.js +30 -0
- package/handlers/catalogs.js +169 -0
- package/handlers/components.js +282 -0
- package/handlers/context-manifest.js +1150 -0
- package/handlers/decisions.js +114 -0
- package/handlers/designs.js +118 -0
- package/handlers/documents.js +227 -0
- package/handlers/entities.js +95 -0
- package/handlers/epics.js +190 -0
- package/handlers/facts.js +62 -0
- package/handlers/feature-flags.js +142 -0
- package/handlers/features.js +137 -0
- package/handlers/folders.js +127 -0
- package/handlers/git-context.js +917 -0
- package/handlers/github.js +72 -0
- package/handlers/graph.js +23 -0
- package/handlers/index.js +205 -0
- package/handlers/links.js +156 -0
- package/handlers/milestones.js +131 -0
- package/handlers/organizations.js +14 -0
- package/handlers/projects.js +122 -0
- package/handlers/recurring-tasks.js +33 -0
- package/handlers/tags.js +124 -0
- package/handlers/tasks.js +561 -0
- package/handlers/testing.js +116 -0
- package/handlers/todos.js +43 -0
- package/handlers/watchers.js +54 -0
- package/handlers/work-templates.js +32 -0
- package/index.js +175 -0
- package/lib/active-session.js +86 -0
- package/lib/auto-assign.js +93 -0
- package/lib/autolink.js +176 -0
- package/lib/changed-files.js +22 -0
- package/lib/env.js +45 -0
- package/lib/git-helpers.js +553 -0
- package/lib/git-utils.js +73 -0
- package/lib/http-client.js +164 -0
- package/lib/links-at-create.js +94 -0
- package/lib/local-cache.js +140 -0
- package/lib/logger.js +109 -0
- package/lib/manifest-loader.js +182 -0
- package/lib/manifest-query.js +686 -0
- package/lib/repo-config-dir.js +118 -0
- package/lib/version.js +10 -0
- package/lib/web-url.js +69 -0
- package/lib/worktree-tools.js +950 -0
- package/package.json +62 -0
- package/prompts/ai-workflow-automation.js +96 -0
- package/prompts/index.js +39 -0
- package/prompts/zephly-usage-guide-content.txt +631 -0
- package/prompts/zephly-usage-guide.js +119 -0
- package/tools/access-entity-types.js +28 -0
- package/tools/access.js +152 -0
- package/tools/activity.js +38 -0
- package/tools/agents.js +208 -0
- package/tools/ai-intelligence.js +111 -0
- package/tools/attachments.js +92 -0
- package/tools/catalogs.js +341 -0
- package/tools/components.js +249 -0
- package/tools/context-manifest.js +236 -0
- package/tools/decisions.js +168 -0
- package/tools/designs.js +222 -0
- package/tools/documents.js +287 -0
- package/tools/entities.js +223 -0
- package/tools/epics.js +267 -0
- package/tools/facts.js +70 -0
- package/tools/feature-flags.js +300 -0
- package/tools/features.js +246 -0
- package/tools/folders.js +122 -0
- package/tools/git-context.js +109 -0
- package/tools/github.js +172 -0
- package/tools/graph.js +70 -0
- package/tools/index.js +77 -0
- package/tools/link-params.js +93 -0
- package/tools/linkable-types.js +36 -0
- package/tools/links.js +199 -0
- package/tools/milestones.js +176 -0
- package/tools/organizations.js +23 -0
- package/tools/projects.js +172 -0
- package/tools/recurring-tasks.js +115 -0
- package/tools/tags.js +219 -0
- package/tools/task-item-schema.js +57 -0
- package/tools/task-type.js +33 -0
- package/tools/tasks.js +680 -0
- package/tools/testing.js +344 -0
- package/tools/todos.js +69 -0
- package/tools/watchers.js +81 -0
- package/tools/work-templates.js +96 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attachment Tools (E-21 #158)
|
|
3
|
+
* MCP tools for AI agents to read and manage file attachments on any entity.
|
|
4
|
+
*
|
|
5
|
+
* Read/manage only: agents can list attachments, fetch signed download/preview
|
|
6
|
+
* URLs, and delete attachments. Files are CREATED via the app's two-phase
|
|
7
|
+
* signed-URL upload flow, not through MCP (byte uploads don't belong in tool
|
|
8
|
+
* args), so there is deliberately no upload tool.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// The ATTACHABLE set, NOT the linkable set — deliberately not LINKABLE_TYPES
|
|
12
|
+
// (tools/linkable-types.js). Attachments only exist on these four entities;
|
|
13
|
+
// offering the 14 linkable types would advertise combinations the API rejects.
|
|
14
|
+
const ENTITY_TYPES = ['task', 'epic', 'goal', 'project'];
|
|
15
|
+
|
|
16
|
+
export const ATTACHMENT_TOOLS = [
|
|
17
|
+
{
|
|
18
|
+
name: 'list_attachments',
|
|
19
|
+
description:
|
|
20
|
+
'List file attachments. Two modes: (1) pass entityType + entityId to list ' +
|
|
21
|
+
'the files on ONE entity (task/epic/goal/project), or (2) pass projectId to ' +
|
|
22
|
+
'get the PROJECT-WIDE aggregate — every file across the project\'s tasks, ' +
|
|
23
|
+
'epics, goals, and the project itself, each enriched with its source entity ' +
|
|
24
|
+
'(entityTitle / entityNumber). Returns attachment metadata (id, name, ' +
|
|
25
|
+
'mimeType, size, storagePath, uploadedAt, entityType, entityId).',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
projectId: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description:
|
|
32
|
+
'Project ID for the project-wide aggregate view. Mutually exclusive ' +
|
|
33
|
+
'with entityType/entityId — supply this OR the entity pair.',
|
|
34
|
+
},
|
|
35
|
+
entityType: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
enum: ENTITY_TYPES,
|
|
38
|
+
description: 'Entity type for single-entity mode (with entityId).',
|
|
39
|
+
},
|
|
40
|
+
entityId: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Entity ID for single-entity mode (with entityType).',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
// Server requires either projectId or (entityType + entityId).
|
|
46
|
+
required: [],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'get_attachment_url',
|
|
51
|
+
description:
|
|
52
|
+
'Get a short-lived signed URL for an attachment so its contents can be ' +
|
|
53
|
+
'fetched. By default the URL force-downloads the file; pass ' +
|
|
54
|
+
'disposition:"inline" for a preview URL that renders in the browser — ' +
|
|
55
|
+
'honored only for safe types (raster images + PDF), otherwise it still ' +
|
|
56
|
+
'downloads. Get the attachmentId from list_attachments.',
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
properties: {
|
|
60
|
+
attachmentId: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'The attachment ID (from list_attachments).',
|
|
63
|
+
},
|
|
64
|
+
disposition: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
enum: ['attachment', 'inline'],
|
|
67
|
+
description:
|
|
68
|
+
'attachment (default) = force download; inline = preview URL for ' +
|
|
69
|
+
'safe types (images/PDF).',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
required: ['attachmentId'],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'delete_attachment',
|
|
77
|
+
description:
|
|
78
|
+
'Delete an attachment by ID. Soft-deletes the metadata, removes the stored ' +
|
|
79
|
+
'file, and releases the org\'s tracked storage usage. Get the attachmentId ' +
|
|
80
|
+
'from list_attachments.',
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: {
|
|
84
|
+
attachmentId: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
description: 'The attachment ID to delete (from list_attachments).',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
required: ['attachmentId'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
];
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog Tools (E-215)
|
|
3
|
+
* MCP tools for org-level Catalogs — a generalized, code-derived catalog.
|
|
4
|
+
* Generalizes the Database Schema entity (E-196): a versioned, checksum-gated
|
|
5
|
+
* snapshot of a list that lives in code (kind = notifications | analytics_events
|
|
6
|
+
* | db_schema | custom), with a GENERIC { columns, items } shape.
|
|
7
|
+
*
|
|
8
|
+
* Capture-at-build: when an agent changes a catalog's source of truth in code
|
|
9
|
+
* (e.g. adds a notification type), it should call manage_catalog action:"snapshot"
|
|
10
|
+
* with the source path/commit in `source`. Snapshots are checksum-gated
|
|
11
|
+
* server-side, so re-snapshotting unchanged structure is a cheap no-op — the same
|
|
12
|
+
* discipline as the DB Schema entity and the Feature Compendium (E-164/E-165).
|
|
13
|
+
* This keeps the catalog from going stale.
|
|
14
|
+
*
|
|
15
|
+
* Snapshots come in two modes (E-226). mode:"patch" sends only upsertItems /
|
|
16
|
+
* removeKeys and the server merges them onto the current version; mode:"replace"
|
|
17
|
+
* (the default) carries the whole { columns, items }. Patch exists because a full
|
|
18
|
+
* snapshot has to be GENERATED token by token — restating a 90+ table db_schema
|
|
19
|
+
* catalog to change one table costs tens of minutes — so incremental capture
|
|
20
|
+
* should always patch.
|
|
21
|
+
*
|
|
22
|
+
* Catalogs ride entity_links (relates_to) — link a catalog to the feature it maps,
|
|
23
|
+
* the feature-flags that gate it, the epics/tasks that change it, and the EzModo
|
|
24
|
+
* document that narrates it (use action:"link").
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { LINKABLE_TYPES } from './linkable-types.js';
|
|
28
|
+
|
|
29
|
+
// Reusable JSON-schema fragment for one column definition in a snapshot. Columns
|
|
30
|
+
// are self-describing so any client can render the item table without knowing the
|
|
31
|
+
// kind.
|
|
32
|
+
const COLUMN_SCHEMA = {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
key: { type: 'string', description: 'Attribute key present on items, e.g. "trigger"' },
|
|
36
|
+
label: { type: 'string', description: 'Human column header (optional)' },
|
|
37
|
+
type: { type: 'string', description: 'Value type hint: "string" | "number" | "bool" | "code" (optional)' },
|
|
38
|
+
},
|
|
39
|
+
required: ['key'],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Reusable JSON-schema fragment for one item (row) in a snapshot.
|
|
43
|
+
const ITEM_SCHEMA = {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
key: { type: 'string', description: 'Stable identity of the item — used for diffing across versions' },
|
|
47
|
+
group: { type: 'string', description: 'Optional section, e.g. "Product types" (optional)' },
|
|
48
|
+
label: { type: 'string', description: 'Human label (optional)' },
|
|
49
|
+
attributes: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
description: 'Kind-specific fields keyed by a column key, e.g. { "trigger": "assignment", "channel": "push" }',
|
|
52
|
+
additionalProperties: true,
|
|
53
|
+
},
|
|
54
|
+
sources: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
items: { type: 'string' },
|
|
57
|
+
description: 'Code references this item was derived from, e.g. ["api/internal/model/notification.go:36"] (optional)',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ['key'],
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Reusable JSON-schema fragment for a snapshot's source (what produced it).
|
|
64
|
+
const SOURCE_SCHEMA = {
|
|
65
|
+
type: 'object',
|
|
66
|
+
description: 'What produced this snapshot — how the version links back to the codebase.',
|
|
67
|
+
properties: {
|
|
68
|
+
sourcePaths: {
|
|
69
|
+
type: 'array',
|
|
70
|
+
items: { type: 'string' },
|
|
71
|
+
description: 'Source file paths, e.g. ["api/internal/model/notification.go"]',
|
|
72
|
+
},
|
|
73
|
+
commitSha: { type: 'string', description: 'Commit sha the change landed in' },
|
|
74
|
+
note: { type: 'string', description: 'Short human note about the change' },
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const CATALOG_TOOLS = [
|
|
79
|
+
{
|
|
80
|
+
name: 'manage_catalog',
|
|
81
|
+
description: 'Create, update, or delete an org-level Catalog, link/unlink it to other artifacts, ' +
|
|
82
|
+
'or push a new versioned snapshot of its contents. A Catalog is a generalized, code-derived ' +
|
|
83
|
+
'catalog (kind = notifications | analytics_events | db_schema | custom); its versions are ' +
|
|
84
|
+
'immutable { columns, items } snapshots.\n\n' +
|
|
85
|
+
'CAPTURE-AT-BUILD (important): whenever you change the catalog\'s source of truth in code, call ' +
|
|
86
|
+
'action:"snapshot" and put the source path/commit in `source`. The server is checksum-gated — ' +
|
|
87
|
+
're-snapshotting unchanged content creates no new version and is a cheap no-op — so it is safe ' +
|
|
88
|
+
'to snapshot after every change. This keeps the catalog current as a side effect of building.\n\n' +
|
|
89
|
+
'PREFER mode:"patch" (important for cost): send ONLY what changed, as `upsertItems` (entries to ' +
|
|
90
|
+
'add or replace, matched by key) and `removeKeys` (entries to delete). The server merges them ' +
|
|
91
|
+
'onto the current version. Writing out a full snapshot means emitting every entry as output ' +
|
|
92
|
+
'tokens — on a large catalog (a db_schema with 90+ tables) that is tens of minutes of generation ' +
|
|
93
|
+
'to change one entry. Read the current entries first with get_catalog (or list_catalog_items) to ' +
|
|
94
|
+
'see which keys exist, then patch just those. Use mode:"replace" with a full `snapshot` only for ' +
|
|
95
|
+
'the catalog\'s FIRST snapshot or a genuine full re-derivation.\n\n' +
|
|
96
|
+
'NOTE for db_schema catalogs: if you have shell access, a live database and the ezmodo repo, ' +
|
|
97
|
+
'`go run ./cmd/dbschema-snapshot -upload -catalog-id <id>` from api/ introspects and uploads the ' +
|
|
98
|
+
'whole schema without passing it through the model at all — cheaper still than a patch.\n\n' +
|
|
99
|
+
'LINK, DON\'T CONTAIN: use action:"link"/"unlink" to relate a catalog to a feature, feature_flag, ' +
|
|
100
|
+
'epic, task, document, component, milestone, goal or project (e.g. link the notification catalog ' +
|
|
101
|
+
'to its Notifications feature and the ezmodo doc that describes it).\n\n' +
|
|
102
|
+
'ITEM-LEVEL LINKS (E-218): pass `itemKey` on action:"link"/"unlink" to attach the link to a SINGLE ' +
|
|
103
|
+
'catalog entry instead of the whole catalog — this is how a task/epic that builds one entry records ' +
|
|
104
|
+
'that relationship. With an itemKey, provide EITHER targetType+targetId (internal work link) OR ' +
|
|
105
|
+
'url[+label] (an external URL, when the entry is handled in another system). Read entries and their ' +
|
|
106
|
+
'links back with list_catalog_items.',
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
action: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
enum: ['create', 'update', 'delete', 'link', 'unlink', 'snapshot'],
|
|
113
|
+
description: 'Action to perform. "snapshot" pushes a new version (checksum-gated) — send a ' +
|
|
114
|
+
'delta with mode:"patch" unless this is the catalog\'s first snapshot. "link"/"unlink" ' +
|
|
115
|
+
'manage relates_to edges to other artifacts.',
|
|
116
|
+
},
|
|
117
|
+
// --- Identifiers ---
|
|
118
|
+
organizationId: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Organization ID (required for create)',
|
|
121
|
+
},
|
|
122
|
+
projectId: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Project ID to scope the catalog to. Omit for an org-wide catalog (create, update)',
|
|
125
|
+
},
|
|
126
|
+
catalogId: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Catalog ID (required for update, delete, link, unlink, snapshot)',
|
|
129
|
+
},
|
|
130
|
+
// --- Create / update fields ---
|
|
131
|
+
kind: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
enum: ['db_schema', 'notifications', 'analytics_events', 'custom'],
|
|
134
|
+
description: 'What the catalog catalogs (default "custom") (create, update)',
|
|
135
|
+
},
|
|
136
|
+
name: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
description: 'Catalog name, e.g. "Notifications" (required for create) (create, update)',
|
|
139
|
+
},
|
|
140
|
+
slug: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
description: 'URL-friendly slug (derived from name when omitted) (create, update)',
|
|
143
|
+
},
|
|
144
|
+
description: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
description: 'What this catalog is, supports markdown (create, update)',
|
|
147
|
+
},
|
|
148
|
+
parentCatalogId: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
description: 'Parent catalog ID to nest under (optional) (create, update)',
|
|
151
|
+
},
|
|
152
|
+
status: {
|
|
153
|
+
type: 'string',
|
|
154
|
+
enum: ['draft', 'active', 'deprecated'],
|
|
155
|
+
description: 'Lifecycle status (default "draft") (create, update)',
|
|
156
|
+
},
|
|
157
|
+
// --- Link / unlink fields ---
|
|
158
|
+
targetType: {
|
|
159
|
+
type: 'string',
|
|
160
|
+
enum: LINKABLE_TYPES,
|
|
161
|
+
description: 'Artifact type to link/unlink (link, unlink)',
|
|
162
|
+
},
|
|
163
|
+
targetId: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'ID of the artifact to link/unlink (link, unlink)',
|
|
166
|
+
},
|
|
167
|
+
itemKey: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: 'Attach the link to a SINGLE catalog entry with this stable key instead of the ' +
|
|
170
|
+
'whole catalog (E-218). With itemKey, use targetType+targetId for an internal work link OR ' +
|
|
171
|
+
'url[+label] for an external URL. (link, unlink)',
|
|
172
|
+
},
|
|
173
|
+
url: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
description: 'External URL to link the entry to (an http(s) link in another system, e.g. a Stripe ' +
|
|
176
|
+
'dashboard). Requires itemKey. Present url ⇒ external-link path instead of a work link. (link, unlink)',
|
|
177
|
+
},
|
|
178
|
+
label: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: 'Optional human label for the external url link (link with itemKey + url)',
|
|
181
|
+
},
|
|
182
|
+
// --- Snapshot fields ---
|
|
183
|
+
mode: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
enum: ['replace', 'patch'],
|
|
186
|
+
description: 'How to apply the snapshot payload (default "replace"). Use "patch" for ' +
|
|
187
|
+
'incremental changes — send only upsertItems/removeKeys and the server merges them onto ' +
|
|
188
|
+
'the current version. Use "replace" only for the FIRST snapshot of a catalog, or when ' +
|
|
189
|
+
'you genuinely re-derived every item (e.g. a full introspection run). (snapshot)',
|
|
190
|
+
},
|
|
191
|
+
snapshot: {
|
|
192
|
+
type: 'object',
|
|
193
|
+
description: 'The full current contents of the catalog. Required in "replace" mode. In ' +
|
|
194
|
+
'"patch" mode omit it, or send only `columns`/`meta` to update those — items sent here ' +
|
|
195
|
+
'are ignored in patch mode (use upsertItems).',
|
|
196
|
+
properties: {
|
|
197
|
+
columns: {
|
|
198
|
+
type: 'array',
|
|
199
|
+
description: 'Self-describing column definitions for the item attributes.',
|
|
200
|
+
items: COLUMN_SCHEMA,
|
|
201
|
+
},
|
|
202
|
+
items: {
|
|
203
|
+
type: 'array',
|
|
204
|
+
description: 'Every entry in the catalog.',
|
|
205
|
+
items: ITEM_SCHEMA,
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
required: ['items'],
|
|
209
|
+
},
|
|
210
|
+
upsertItems: {
|
|
211
|
+
type: 'array',
|
|
212
|
+
description: 'Patch mode only: entries to add or replace, matched by `key`. An entry whose ' +
|
|
213
|
+
'key already exists is replaced WHOLESALE (send its complete attributes, not a partial); ' +
|
|
214
|
+
'one whose key is new is appended. Entries you do not list are left untouched.',
|
|
215
|
+
items: ITEM_SCHEMA,
|
|
216
|
+
},
|
|
217
|
+
removeKeys: {
|
|
218
|
+
type: 'array',
|
|
219
|
+
description: 'Patch mode only: item keys to delete from the catalog. Removing a key that is ' +
|
|
220
|
+
'not present is a safe no-op. A key may not appear in both upsertItems and removeKeys.',
|
|
221
|
+
items: { type: 'string' },
|
|
222
|
+
},
|
|
223
|
+
source: SOURCE_SCHEMA,
|
|
224
|
+
},
|
|
225
|
+
required: ['action'],
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'get_catalog',
|
|
230
|
+
description: 'Retrieve a single Catalog and, by default, its CURRENT snapshot (the live { columns, ' +
|
|
231
|
+
'items } you read to understand the catalog). Pass `version` to read a specific historical ' +
|
|
232
|
+
'snapshot instead, `includeVersions` to also get the version history (metadata only), or ' +
|
|
233
|
+
'`metadataOnly` to skip the snapshot blob.',
|
|
234
|
+
inputSchema: {
|
|
235
|
+
type: 'object',
|
|
236
|
+
properties: {
|
|
237
|
+
catalogId: {
|
|
238
|
+
type: 'string',
|
|
239
|
+
description: 'Catalog ID (required)',
|
|
240
|
+
},
|
|
241
|
+
version: {
|
|
242
|
+
type: 'number',
|
|
243
|
+
description: 'Return this specific version\'s full snapshot instead of the current one',
|
|
244
|
+
},
|
|
245
|
+
includeVersions: {
|
|
246
|
+
type: 'boolean',
|
|
247
|
+
description: 'Also include the list of version metadata (history), newest first',
|
|
248
|
+
},
|
|
249
|
+
versionsLimit: {
|
|
250
|
+
type: 'number',
|
|
251
|
+
description: 'Max number of versions to include when includeVersions is set',
|
|
252
|
+
},
|
|
253
|
+
metadataOnly: {
|
|
254
|
+
type: 'boolean',
|
|
255
|
+
description: 'Return just the catalog row without fetching any snapshot blob',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
required: ['catalogId'],
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'list_catalogs',
|
|
263
|
+
description: 'List the Catalogs in an organization (optionally filtered by project or kind), or ' +
|
|
264
|
+
'the catalogs linked to a given entity. Returns catalog metadata (name, kind, current version) ' +
|
|
265
|
+
'— use get_catalog to read a catalog\'s snapshot.',
|
|
266
|
+
inputSchema: {
|
|
267
|
+
type: 'object',
|
|
268
|
+
properties: {
|
|
269
|
+
organizationId: {
|
|
270
|
+
type: 'string',
|
|
271
|
+
description: 'Organization ID (required)',
|
|
272
|
+
},
|
|
273
|
+
projectId: {
|
|
274
|
+
type: 'string',
|
|
275
|
+
description: 'Filter to a single project\'s catalogs',
|
|
276
|
+
},
|
|
277
|
+
kind: {
|
|
278
|
+
type: 'string',
|
|
279
|
+
enum: ['db_schema', 'notifications', 'analytics_events', 'custom'],
|
|
280
|
+
description: 'Filter to a single kind',
|
|
281
|
+
},
|
|
282
|
+
linkedType: {
|
|
283
|
+
type: 'string',
|
|
284
|
+
enum: LINKABLE_TYPES,
|
|
285
|
+
description: 'With linkedId, return catalogs linked (relates_to) to this entity type, e.g. "feature"',
|
|
286
|
+
},
|
|
287
|
+
linkedId: {
|
|
288
|
+
type: 'string',
|
|
289
|
+
description: 'With linkedType, the entity ID whose linked catalogs to return',
|
|
290
|
+
},
|
|
291
|
+
limit: {
|
|
292
|
+
type: 'number',
|
|
293
|
+
description: 'Maximum number of results',
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
required: ['organizationId'],
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'get_catalog_diff',
|
|
301
|
+
description: 'Diff two versions of a Catalog — returns added/removed items (by key) and, for items ' +
|
|
302
|
+
'present in both, the before/after of those that changed. Use it to see how the catalog evolved ' +
|
|
303
|
+
'between two snapshots.',
|
|
304
|
+
inputSchema: {
|
|
305
|
+
type: 'object',
|
|
306
|
+
properties: {
|
|
307
|
+
catalogId: {
|
|
308
|
+
type: 'string',
|
|
309
|
+
description: 'Catalog ID (required)',
|
|
310
|
+
},
|
|
311
|
+
from: {
|
|
312
|
+
type: 'number',
|
|
313
|
+
description: 'The earlier version number to diff from (required)',
|
|
314
|
+
},
|
|
315
|
+
to: {
|
|
316
|
+
type: 'number',
|
|
317
|
+
description: 'The later version number to diff to (required)',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
required: ['catalogId', 'from', 'to'],
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: 'list_catalog_items',
|
|
325
|
+
description: 'List a Catalog\'s ENTRIES that carry item-level links (E-218) — each returned with its ' +
|
|
326
|
+
'work links and external URLs attached. Only entries with at least one link are returned (unlinked ' +
|
|
327
|
+
'entries already live in the snapshot from get_catalog); links are compact {entityType,entityId} ' +
|
|
328
|
+
'edges and urls are {url,label}, not expanded entities. Use it to see which catalog entries are ' +
|
|
329
|
+
'wired to work or to other systems.',
|
|
330
|
+
inputSchema: {
|
|
331
|
+
type: 'object',
|
|
332
|
+
properties: {
|
|
333
|
+
catalogId: {
|
|
334
|
+
type: 'string',
|
|
335
|
+
description: 'Catalog ID (required)',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
required: ['catalogId'],
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
];
|