exponential-mcp 0.8.0 → 0.12.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 CHANGED
@@ -134,10 +134,10 @@ Alongside the tools above, every part of the [Exponential SDK](https://www.npmjs
134
134
  is exposed as one tool per domain, so the MCP server can do anything the SDK
135
135
  and CLI can:
136
136
 
137
- `actions` · `projects` · `workspaces` · `goals` · `key_results` · `meetings` ·
137
+ `actions` · `projects` · `workspaces` · `positions` · `goals` · `key_results` · `meetings` ·
138
138
  `time` · `decisions` · `contacts` · `organizations` · `deals` · `products` ·
139
139
  `features` · `scopes` · `requirements` · `areas` · `stories` · `epics` ·
140
- `tickets` · `labels` · `pages` · `comments`
140
+ `tickets` · `labels` · `pages` · `databases` · `comments`
141
141
 
142
142
  Each takes `{ operation, params }`. The tool description lists every operation
143
143
  with a one-line signature; `operation: "describe"` returns the full parameter
@@ -152,6 +152,17 @@ Invalid params come back as an error that includes the expected schema.
152
152
  `comments` covers comments on actions, features, pages, goals and tickets — pass
153
153
  `target` to choose which.
154
154
 
155
+ `positions` is a workspace's roles & responsibilities — the Positions on the
156
+ settings page: list, create, update, set_holders, delete, and import_many
157
+ (upsert by title, with a dry run). Writes need your own API key, not an agent
158
+ key, and owner/admin, except that a holder may edit their own Position's remit.
159
+
160
+ `databases` is the typed write path for tables inside pages (ADR-0078): a
161
+ database is a block in a page body and each row is a page. **Values are typed
162
+ per property** — a select takes an option name, a date an ISO string, a person
163
+ a user ID — and a wrong value is refused naming the property, so call `get`
164
+ first to learn the schema. Reading the page with `pages` shows the table.
165
+
155
166
  ### Asking about the day
156
167
 
157
168
  Use **`get_todays_actions`**, not `get_actions`, for anything about today,
@@ -0,0 +1,2 @@
1
+ import { type Domain } from './framework.js';
2
+ export declare const databases: Domain;
@@ -0,0 +1,168 @@
1
+ import { z } from 'zod';
2
+ import { id, op } from './framework.js';
3
+ const note = z
4
+ .string()
5
+ .optional()
6
+ .describe('Why you made this change — one sentence. It is recorded on the row page\'s revision; a write without one reads "No reason given".');
7
+ const databaseId = id('Database');
8
+ const PROPERTY_TYPES = [
9
+ 'text',
10
+ 'number',
11
+ 'select',
12
+ 'multiSelect',
13
+ 'date',
14
+ 'checkbox',
15
+ 'url',
16
+ 'person',
17
+ 'createdTime',
18
+ 'lastEditedTime',
19
+ 'createdBy',
20
+ ];
21
+ const optionInput = z.object({
22
+ id: z.string().optional().describe('Pass to rename or recolour an existing option; omit for a new one'),
23
+ name: z.string().min(1),
24
+ color: z
25
+ .enum(['gray', 'red', 'pink', 'grape', 'violet', 'indigo', 'blue', 'cyan', 'teal', 'green', 'lime', 'yellow', 'orange'])
26
+ .optional()
27
+ .describe('Palette name; defaults to the next free colour'),
28
+ });
29
+ const filterInput = z.object({
30
+ propertyId: z.string().describe('Property ID (not name)'),
31
+ op: z.enum(['eq', 'neq', 'contains', 'isEmpty', 'isNotEmpty', 'gt', 'lt', 'before', 'after', 'anyOf']),
32
+ value: z
33
+ .unknown()
34
+ .optional()
35
+ .describe('Checked like a written value: a select by option name or id; anyOf a list; gt/lt a number; before/after an ISO date'),
36
+ });
37
+ const viewInput = z
38
+ .object({
39
+ sort: z.object({ propertyId: z.string(), direction: z.enum(['asc', 'desc']) }).optional(),
40
+ filters: z.array(filterInput).default([]),
41
+ hiddenPropertyIds: z.array(z.string()).default([]),
42
+ propertyOrder: z.array(z.string()).default([]).describe('Column order by property ID; unlisted properties follow in definition order'),
43
+ })
44
+ .describe('A whole view: { sort?, filters, hiddenPropertyIds, propertyOrder }. Every property it names must exist (by ID).');
45
+ /**
46
+ * Cell values: the one place agents get this wrong, so the description spells
47
+ * out the typing rules the server enforces.
48
+ */
49
+ const values = z
50
+ .record(z.unknown())
51
+ .describe('Cell values keyed by property NAME or ID. Each value is typed by its property and a wrong one is refused naming the property: ' +
52
+ 'title/text/url → string; number → number (or numeric string); select → an option NAME or id (not free text — add the option first with update_property); ' +
53
+ 'multiSelect → list of option names/ids (or comma-separated string); date → ISO 8601 string; checkbox → boolean or "yes"/"no"; ' +
54
+ 'person → user ID or list of them. null clears a cell. The title property\'s value becomes the row page\'s title. ' +
55
+ 'createdTime/lastEditedTime/createdBy are read-only; relation values are set in V3.');
56
+ export const databases = {
57
+ name: 'databases',
58
+ description: 'Databases: typed tables inside pages (ADR-0078). A database is a block in a page body, owned by that page; each row is a page of its own — read its prose and history with the `pages` tool (`get` on the row ID shows its property header). ' +
59
+ 'WRITES ARE TYPED: every value is checked against its property\'s type and a bad value is refused with the property named — read the database first (`get`) to learn the property names, types and select options. ' +
60
+ 'Reading the holding page with `pages.get` shows the table; use this tool to write, or to read rows as data. ' +
61
+ 'Not a work tracker: never put tasks, tickets or projects in a database — those have their own tools.',
62
+ operations: {
63
+ create: op({
64
+ summary: 'Create a database on a page with a title property, and (by default) place its block at the end of the page body. Then add properties and rows.',
65
+ params: z.object({
66
+ pageId: id('Page').describe('The page that will hold it; you need edit access'),
67
+ name: z.string().min(1).describe('e.g. "Metrics"'),
68
+ place: z
69
+ .boolean()
70
+ .optional()
71
+ .describe('Default true: append the marker line to the page body so the page shows the table. False returns the marker for you to place.'),
72
+ note,
73
+ }),
74
+ run: async (client, { pageId, name, place, note: why }) => {
75
+ const database = await client.databases.create({ pageId, name });
76
+ if (place === false || !database.marker)
77
+ return { ...database, placed: false };
78
+ const page = await client.pages.get(pageId);
79
+ const body = page.body?.trimEnd();
80
+ await client.pages.update({
81
+ id: pageId,
82
+ body: body ? `${body}\n\n${database.marker}` : database.marker,
83
+ baseVersion: page.docVersion,
84
+ note: why ?? `Add the ${database.name} database`,
85
+ });
86
+ return { ...database, placed: true };
87
+ },
88
+ }),
89
+ get: op({
90
+ summary: 'One database: its properties (names, types, select options with ids), saved view, row count and holding page. Read this before writing rows.',
91
+ params: z.object({ id: databaseId }),
92
+ run: (client, { id }) => client.databases.get(id),
93
+ }),
94
+ list: op({
95
+ summary: 'The databases a page holds, detached ones included (detachedAt set: the block is out of the body; rows wait 30 days for the purge).',
96
+ params: z.object({ pageId: id('Page') }),
97
+ run: (client, { pageId }) => client.databases.list(pageId),
98
+ }),
99
+ update: op({
100
+ summary: 'Rename a database, or replace its saved view WHOLE (send the full view, not a patch).',
101
+ params: z.object({ id: databaseId, name: z.string().min(1).optional(), view: viewInput.optional() }),
102
+ run: (client, params) => client.databases.update(params),
103
+ }),
104
+ delete: op({
105
+ summary: 'Delete a database and every row with it (the rows are pages). Removing the block from the page only detaches; this is the delete.',
106
+ params: z.object({ id: databaseId }),
107
+ run: (client, { id }) => client.databases.delete(id),
108
+ }),
109
+ add_property: op({
110
+ summary: `Add a property (column). Types: ${PROPERTY_TYPES.join(', ')}. title exists from creation; relation arrives with V3. Select options get stable ids.`,
111
+ params: z.object({
112
+ id: databaseId,
113
+ name: z.string().min(1),
114
+ type: z.enum(PROPERTY_TYPES),
115
+ description: z.string().optional(),
116
+ options: z.array(optionInput).optional().describe('select/multiSelect only'),
117
+ }),
118
+ run: (client, params) => client.databases.addProperty(params),
119
+ }),
120
+ update_property: op({
121
+ summary: 'Rename, retype, describe or re-option a property. Ids stay, no row is rewritten. options replaces the whole list: include existing options with their id to keep them, leave one out to remove it.',
122
+ params: z.object({
123
+ id: databaseId,
124
+ propertyId: z.string().describe('Property ID or its (unique) name'),
125
+ name: z.string().min(1).optional(),
126
+ description: z.string().nullable().optional().describe('null clears it'),
127
+ type: z.enum(PROPERTY_TYPES).optional().describe('Not for the title property'),
128
+ options: z.array(optionInput).optional(),
129
+ }),
130
+ run: (client, params) => client.databases.updateProperty(params),
131
+ }),
132
+ remove_property: op({
133
+ summary: 'Remove a property from the schema and view (never the title). Row values under it stay until each row is next written.',
134
+ params: z.object({ id: databaseId, propertyId: z.string().describe('Property ID or name') }),
135
+ run: (client, { id, propertyId }) => client.databases.removeProperty(id, propertyId),
136
+ }),
137
+ reorder_properties: op({
138
+ summary: 'Set the column order; propertyIds must name every property exactly once.',
139
+ params: z.object({ id: databaseId, propertyIds: z.array(z.string()).min(1) }),
140
+ run: (client, { id, propertyIds }) => client.databases.reorderProperties(id, propertyIds),
141
+ }),
142
+ list_rows: op({
143
+ summary: 'Rows with their typed values (keyed by property ID; select values are option ids — map them with get), through the saved view or a view you pass. Paged: pass nextCursor back as cursor. columns = visible property ids in order.',
144
+ params: z.object({
145
+ id: databaseId,
146
+ view: viewInput.optional(),
147
+ limit: z.number().int().min(1).max(200).optional().describe('Default 50'),
148
+ cursor: z.string().optional(),
149
+ }),
150
+ run: (client, { id, ...options }) => client.databases.listRows(id, options),
151
+ }),
152
+ add_row: op({
153
+ summary: 'Add a row with typed values (see values). It becomes a page placed where the holding page is; the title property is its title.',
154
+ params: z.object({ id: databaseId, values: values.optional(), note }),
155
+ run: (client, { id, values: v, note: why }) => client.databases.createRow(id, v ?? {}, { note: why }),
156
+ }),
157
+ update_row: op({
158
+ summary: 'Write some of a row\'s cells (see values). Cells you do not name are kept; null clears one. Recorded as a revision on the row page.',
159
+ params: z.object({ rowId: id('Row page'), values, note }),
160
+ run: (client, { rowId, values: v, note: why }) => client.databases.updateRow(rowId, v, { note: why }),
161
+ }),
162
+ delete_row: op({
163
+ summary: 'Delete a row: the page and its search chunks.',
164
+ params: z.object({ rowId: id('Row page') }),
165
+ run: (client, { rowId }) => client.databases.deleteRow(rowId),
166
+ }),
167
+ },
168
+ };
@@ -2,6 +2,7 @@ import { actions } from './actions.js';
2
2
  import { areas } from './areas.js';
3
3
  import { comments } from './comments.js';
4
4
  import { contacts } from './contacts.js';
5
+ import { databases } from './databases.js';
5
6
  import { deals } from './deals.js';
6
7
  import { decisions } from './decisions.js';
7
8
  import { epics } from './epics.js';
@@ -12,6 +13,7 @@ import { labels } from './labels.js';
12
13
  import { meetings } from './meetings.js';
13
14
  import { organizations } from './organizations.js';
14
15
  import { pages } from './pages.js';
16
+ import { positions } from './positions.js';
15
17
  import { products } from './products.js';
16
18
  import { projects } from './projects.js';
17
19
  import { requirements } from './requirements.js';
@@ -26,6 +28,7 @@ export const DOMAINS = new Map([
26
28
  actions,
27
29
  projects,
28
30
  workspaces,
31
+ positions,
29
32
  goals,
30
33
  keyResults,
31
34
  meetings,
@@ -44,5 +47,6 @@ export const DOMAINS = new Map([
44
47
  tickets,
45
48
  labels,
46
49
  pages,
50
+ databases,
47
51
  comments,
48
52
  ].map((domain) => [domain.name, domain]));
@@ -1,44 +1,120 @@
1
1
  import { z } from 'zod';
2
- import { id, op, workspaceId } from './framework.js';
2
+ import { date, id, op, workspaceId } from './framework.js';
3
+ const note = z
4
+ .string()
5
+ .optional()
6
+ .describe('Why you made this change — one sentence. Always send it: it is shown in the page history, and a write without one reads "No reason given" to everyone.');
7
+ const source = z
8
+ .string()
9
+ .nullable()
10
+ .optional()
11
+ .describe('Provenance: where the facts come from — a URL, a document, a person. Empty/null clears it.');
12
+ const asOf = date('Provenance: the date the facts were true').nullable().optional();
3
13
  export const pages = {
4
14
  name: 'pages',
5
- description: 'Knowledge pages: workspace-scoped Markdown documents (PRDs, research, technical specs), optionally filed under a project. Link one to a feature with `features` link_page; page comments are in the `comments` tool.',
15
+ description: 'Knowledge pages: workspace-scoped Markdown documents (strategy, PRDs, research, specs), optionally filed under a project. Reads are Markdown-only (the editor doc is never sent); use `outline` then `get` with `section` on long pages. Every write is recorded in the page history — pass a `note` saying why, and `baseVersion` so you never overwrite a newer edit. Link one to a feature with `features` link_page; page comments are in the `comments` tool.',
6
16
  operations: {
7
17
  list: op({
8
- summary: 'List pages you can view, most recently edited first. Returns metadata only (no body) — use get for the content.',
18
+ summary: 'List pages you can view, most recently edited first. Metadata only (no body) — use get for the content, search to find pages by meaning.',
9
19
  params: z.object({
10
20
  workspaceId,
11
21
  projectId: id('Project').optional(),
12
- search: z.string().optional().describe('Case-insensitive match on title only'),
22
+ search: z.string().optional().describe('Case-insensitive title match; use the search operation for content or meaning'),
13
23
  }),
14
24
  run: (client, params) => client.pages.list(params),
15
25
  }),
26
+ search: op({
27
+ summary: 'Find pages by meaning: semantic hits from the Knowledge index first (nearest first, with the matching passage as snippet), then pages whose title or body contain the text. Only pages you can view.',
28
+ params: z.object({
29
+ workspaceId,
30
+ query: z.string().min(2).max(200).describe('What the page should be about'),
31
+ projectId: id('Project').optional(),
32
+ limit: z.number().int().min(1).max(25).optional().describe('Max pages (default 10)'),
33
+ }),
34
+ run: (client, params) => client.pages.search(params),
35
+ }),
16
36
  get: op({
17
- summary: 'Get one page with its Markdown body and whether you can edit it (canEdit).',
37
+ summary: 'Get one page: Markdown body, bodyBytes (size of the whole body) and canEdit. Pass section to read one heading only.',
38
+ params: z.object({
39
+ id: id('Page'),
40
+ section: z
41
+ .string()
42
+ .optional()
43
+ .describe('Only this heading\'s section (case-insensitive; "## " prefix allowed). Unknown headings fail with the list that exists.'),
44
+ }),
45
+ run: (client, { id, section }) => client.pages.get(id, { format: 'markdown', section }),
46
+ }),
47
+ outline: op({
48
+ summary: 'The page\'s headings (level, text, line) and bodyBytes, no body — see a long page\'s shape before reading a section.',
18
49
  params: z.object({ id: id('Page') }),
19
- run: (client, { id }) => client.pages.get(id),
50
+ run: (client, { id }) => client.pages.outline(id),
20
51
  }),
21
52
  create: op({
22
- summary: 'Create a page. Title defaults to "Untitled"; a non-empty body is indexed for search.',
53
+ summary: 'Create a page. Title defaults to "Untitled"; a non-empty body is indexed for search. The note lands on its first revision.',
23
54
  params: z.object({
24
55
  workspaceId,
25
56
  projectId: z.string().nullable().optional().describe('Project ID to file it under (null/omit = workspace-level)'),
26
57
  title: z.string().optional(),
27
58
  body: z.string().optional().describe('Markdown body'),
28
59
  includeInSearch: z.boolean().optional().describe('Default true'),
60
+ note,
61
+ source,
62
+ asOf,
29
63
  }),
30
64
  run: (client, params) => client.pages.create(params),
31
65
  }),
32
66
  update: op({
33
- summary: 'Update a page. Only the fields you pass change; body replaces the whole document (comment anchors are carried across where their text survives).',
67
+ summary: 'Update a page. Only the fields you pass change; body replaces the whole document (comment anchors are carried across where their text survives). Send baseVersion (the docVersion you read) so a newer edit by someone else fails with CONFLICT instead of being overwritten.',
34
68
  params: z.object({
35
69
  id: id('Page'),
36
70
  title: z.string().optional(),
37
71
  projectId: z.string().nullable().optional().describe('Project ID (null to move to workspace-level)'),
38
72
  includeInSearch: z.boolean().optional(),
39
73
  body: z.string().optional().describe('Markdown body; replaces the existing body entirely'),
74
+ baseVersion: z.number().int().min(0).optional().describe('The docVersion you read before editing'),
75
+ note,
76
+ source,
77
+ asOf,
40
78
  }),
41
79
  run: (client, params) => client.pages.update(params),
42
80
  }),
81
+ history: op({
82
+ summary: 'The page\'s revisions, newest first: who (authorHidden when names are withheld from you; baseline and automated rows have no author and the note says what wrote them), when, kind (baseline/create/editor/markdown/restore), note, provenance and body size. Never the bodies.',
83
+ params: z.object({
84
+ id: id('Page'),
85
+ limit: z.number().int().min(1).max(200).optional().describe('Default 50'),
86
+ cursor: z.string().optional().describe('nextCursor from a previous call'),
87
+ }),
88
+ run: (client, { id, ...options }) => client.pages.history(id, options),
89
+ }),
90
+ revision: op({
91
+ summary: 'One revision with its Markdown body.',
92
+ params: z.object({ id: id('Page'), revisionId: id('Revision') }),
93
+ run: (client, { id, revisionId }) => client.pages.revision(id, revisionId),
94
+ }),
95
+ diff: op({
96
+ summary: 'What a revision changed: a unified diff of the Markdown with added/removed counts, plus titleChanged and provenanceChanged (source/asOf on both sides). against: "previous" (default — the revision before it), "current" (the page now) or another revision id.',
97
+ params: z.object({
98
+ id: id('Page'),
99
+ revisionId: id('Revision'),
100
+ against: z.string().optional().describe('"previous" (default), "current", or a revision ID'),
101
+ }),
102
+ run: (client, { id, revisionId, against }) => client.pages.diff(id, revisionId, { against }),
103
+ }),
104
+ restore: op({
105
+ summary: 'Put a revision\'s title and body back as the page\'s current content. A forward write: docVersion bumps and a "restore" revision is recorded, so nothing is lost.',
106
+ params: z.object({
107
+ id: id('Page'),
108
+ revisionId: id('Revision'),
109
+ note,
110
+ baseVersion: z
111
+ .number()
112
+ .int()
113
+ .min(0)
114
+ .optional()
115
+ .describe('The newest revision\'s docVersion from history when you decided; a newer save makes this a CONFLICT. Always send it.'),
116
+ }),
117
+ run: (client, { id, revisionId, note, baseVersion }) => client.pages.restore(id, revisionId, { note, baseVersion }),
118
+ }),
43
119
  },
44
120
  };
@@ -0,0 +1,2 @@
1
+ import { type Domain } from './framework.js';
2
+ export declare const positions: Domain;
@@ -0,0 +1,81 @@
1
+ import { z } from 'zod';
2
+ import { id, op, workspaceId } from './framework.js';
3
+ const title = z.string().trim().min(1).max(80).describe('Title, 1–80 characters, unique in the workspace');
4
+ const remit = z
5
+ .string()
6
+ .trim()
7
+ .min(1)
8
+ .max(2000)
9
+ .describe('Markdown, 1–2000 characters: the kinds of work its holders take on');
10
+ const notAccountableFor = z.string().trim().max(2000).describe('Markdown, up to 2000 characters');
11
+ const holderUserIds = z
12
+ .array(z.string())
13
+ .max(50)
14
+ .describe('User IDs of workspace members (see `workspaces` list_members)');
15
+ const positionId = id('Position');
16
+ export const positions = {
17
+ name: 'positions',
18
+ description: "A workspace's roles & responsibilities (Positions): what each role takes on (remit), what it is not accountable for, and who holds it — humans and agents alike. Shown on the workspace settings page. Routing data only; it never grants access. Every write needs the user's own API key (agent keys are refused) and owner/admin, except that a holder who is at least a member may edit their Position's remit. Resolve holders with `workspaces` list_members.",
19
+ operations: {
20
+ list: op({
21
+ summary: 'Every Position with its holders, plus one row per member: { positions, members: [{ userId, positionIds, remitGap }] }. remitGap = no stated remit.',
22
+ params: z.object({ workspaceId }),
23
+ run: (client, { workspaceId }) => client.positions.list(workspaceId),
24
+ }),
25
+ coverage: op({
26
+ summary: 'How many members have a stated remit, and whether to offer an import.',
27
+ params: z.object({ workspaceId }),
28
+ run: (client, { workspaceId }) => client.positions.coverage(workspaceId),
29
+ }),
30
+ create: op({
31
+ summary: 'Create a Position (owner/admin). A duplicate title is CONFLICT.',
32
+ params: z.object({
33
+ workspaceId,
34
+ title,
35
+ remit,
36
+ notAccountableFor: notAccountableFor.optional(),
37
+ holderUserIds: holderUserIds.optional(),
38
+ }),
39
+ run: (client, params) => client.positions.create(params),
40
+ }),
41
+ update: op({
42
+ summary: 'Edit a Position. Pass at least one field. holderUserIds REPLACES the holder set; notAccountableFor null or "" clears it.',
43
+ params: z.object({
44
+ workspaceId,
45
+ positionId,
46
+ title: title.optional(),
47
+ remit: remit.optional(),
48
+ notAccountableFor: notAccountableFor.nullable().optional(),
49
+ holderUserIds: holderUserIds.optional(),
50
+ }),
51
+ run: (client, params) => client.positions.update(params),
52
+ }),
53
+ set_holders: op({
54
+ summary: 'Replace who holds a Position (owner/admin). An empty list leaves it unheld.',
55
+ params: z.object({ workspaceId, positionId, userIds: holderUserIds }),
56
+ run: (client, { workspaceId, positionId, userIds }) => client.positions.setHolders(workspaceId, positionId, userIds),
57
+ }),
58
+ delete: op({
59
+ summary: 'Delete a Position (owner/admin). Its holdings go with it.',
60
+ params: z.object({ workspaceId, positionId }),
61
+ run: (client, { workspaceId, positionId }) => client.positions.delete(workspaceId, positionId),
62
+ }),
63
+ import_many: op({
64
+ summary: 'Upsert 1–50 Positions by title (case-insensitive; never renames), all or nothing (owner/admin). An update replaces the remit, keeps notAccountableFor when omitted ("" clears), and only ADDS holders. Run dryRun: true first and show the plan.',
65
+ params: z.object({
66
+ workspaceId,
67
+ dryRun: z.boolean().describe('true = validate and return the plan without writing'),
68
+ positions: z
69
+ .array(z.object({
70
+ title,
71
+ remit,
72
+ notAccountableFor: notAccountableFor.optional(),
73
+ holderUserIds,
74
+ }))
75
+ .min(1)
76
+ .max(50),
77
+ }),
78
+ run: (client, params) => client.positions.importMany(params),
79
+ }),
80
+ },
81
+ };
package/dist/index.js CHANGED
@@ -531,21 +531,30 @@ const TOOLS = [
531
531
  },
532
532
  {
533
533
  name: 'search',
534
- description: "Global text search across everything the user can access — projects, actions/tasks, goals, workspaces (and more entity types as the API grows). Same coverage as the app's Cmd+K palette. Returns typed results with ids, workspace, and app URL.",
534
+ description: "Global search across everything the user can access — projects, actions/tasks, goals, workspaces, pages, meetings and more. Same coverage as the app's Cmd+K palette; matches titles. Set semantic: true to search the workspace's Knowledge index by meaning instead (meetings, resources, documents and pages, each with its best-matching passage) — that needs workspaceId. For pages only, the `pages` tool's search operation is more precise. Returns typed results with ids, workspace, and app URL.",
535
535
  inputSchema: {
536
536
  type: 'object',
537
537
  properties: {
538
538
  query: {
539
539
  type: 'string',
540
- description: 'Search query'
540
+ description: 'Search query (3+ characters when semantic)'
541
541
  },
542
542
  workspaceId: {
543
543
  type: 'string',
544
- description: 'Optional workspace ID to restrict results to one workspace'
544
+ description: 'Workspace ID to restrict results to one workspace. Required when semantic is true.'
545
545
  },
546
546
  limit: {
547
547
  type: 'number',
548
- description: 'Max results per entity type (1-25, default 10)'
548
+ description: 'Max results per entity type (1-25, default 10); max sources when semantic (1-20, default 5)'
549
+ },
550
+ semantic: {
551
+ type: 'boolean',
552
+ description: 'Search by meaning over the Knowledge index instead of matching titles'
553
+ },
554
+ sourceTypes: {
555
+ type: 'array',
556
+ items: { type: 'string', enum: ['transcription', 'resource', 'document', 'page'] },
557
+ description: 'With semantic: restrict to these source kinds'
549
558
  }
550
559
  },
551
560
  required: ['query']
@@ -904,6 +913,21 @@ async function main() {
904
913
  };
905
914
  }
906
915
  case 'search': {
916
+ if (args?.semantic) {
917
+ const workspaceId = args?.workspaceId;
918
+ if (!workspaceId) {
919
+ throw new Error('semantic search runs one workspace at a time: pass workspaceId (see get_workspaces).');
920
+ }
921
+ const knowledge = await client.search.knowledge({
922
+ query: args?.query,
923
+ workspaceId,
924
+ limit: args?.limit,
925
+ sourceTypes: args?.sourceTypes,
926
+ });
927
+ return {
928
+ content: [{ type: 'text', text: JSON.stringify(knowledge, null, 2) }],
929
+ };
930
+ }
907
931
  const results = await client.search.global({
908
932
  query: args?.query,
909
933
  workspaceId: args?.workspaceId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exponential-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.12.0",
4
4
  "description": "MCP server for Exponential - connect Claude to your projects, actions, goals, CRM, tickets and more",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@modelcontextprotocol/sdk": "^1.30.0",
28
28
  "commander": "^12.0.0",
29
- "exponential-sdk": "^1.21.0",
29
+ "exponential-sdk": "^1.29.0",
30
30
  "zod": "^3.22.0",
31
31
  "zod-to-json-schema": "^3.25.2"
32
32
  },