@axonity-ai/mcp 0.8.0 → 0.10.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.
@@ -324,6 +324,12 @@ made any time before you attach them.
324
324
  \`update_flow\` write draft state; runtime uses \`read_flow_published\` until
325
325
  approval. \`request_publish_flow\` to publish, \`discard_flow_draft\` to reset.
326
326
 
327
+ ### data_table
328
+ - An authored table of rows: the tenant's own reference data, designed and
329
+ maintained by a person, read by agents and decisions. Same lifecycle as an
330
+ output schema — draft, version, request publish. See "Tables" below, which is
331
+ where the rules that are NOT the generic ones live.
332
+
327
333
  ### company
328
334
  - The tenant's single company document (mission, value streams, org structure).
329
335
  A SINGLETON — one per tenant, no id, so there is no list/create/delete:
@@ -615,6 +621,26 @@ a document to find out what the platform did.
615
621
  - \`list_all_cron_schedules\` answers "what runs tonight?" across the tenant;
616
622
  \`reconcile_cron_schedules\` answers "is that actually what runs?". The second
617
623
  reports rather than tidying silently and never arms something switched off.
624
+ - **A conditional trigger without a CHECK starts the workflow every beat.** It
625
+ wakes on its interval and, with nothing set, runs regardless of whether there
626
+ was anything to do — a mailbox on fifteen minutes then makes ninety-six empty
627
+ runs a day. Set \`checkKind\` on \`create_conditional_trigger\`, or on an
628
+ existing one with \`update_conditional_trigger\`; every trigger authored
629
+ before checks existed has none, so read \`checkKind\` in
630
+ \`list_conditional_triggers\` before assuming otherwise.
631
+ - \`checkKind: "automatic"\` is ONE tool call and one rule on its answer — no
632
+ model, so it is the cheap way to ask "is there anything there?". Its
633
+ \`checkConfig\` is \`{ toolId, inputs?, rule: { field, op, value } }\`, where
634
+ \`field\` names a key OF THE TOOL'S ANSWER. A rule pointing at a field the
635
+ tool never returns is reported as a broken setup, not as "condition not met".
636
+ \`"agent"\` is reserved for a model judging the condition and is refused
637
+ today. Do not pre-validate a check here — the backend judges it with the same
638
+ function the dispatcher runs when the trigger fires, and its refusal says
639
+ what to change.
640
+ - **To take a check off again, send \`checkKind: ""\`** — the empty string. It
641
+ clears the kind and its config together and returns the trigger to starting
642
+ every beat. Omitting the field leaves the check standing, which is why the
643
+ empty string exists at all.
618
644
 
619
645
  ## Evaluating what you built
620
646
  - There is no findings endpoint and no evaluator entity. To judge a run, read it:
@@ -714,6 +740,78 @@ Both halves live in the workflow DOCUMENT, so both are ordinary
714
740
  \`metadataRedacted\`. If you need one of those values, a human reads it in
715
741
  Axonity — do not try another route to it.
716
742
 
743
+ ## Tables — the tenant's own reference data
744
+ A table is an authored library element that HOLDS ROWS: the pricing bands, the
745
+ region-to-owner map, the list of accepted reason codes. A person designs the
746
+ columns and maintains the content; agents and decisions read it.
747
+
748
+ **When a table is the right element.** Reach for one when the CONTENT is the
749
+ point and it changes without the process changing.
750
+ - Not an \`output_schema\`: that describes a SHAPE and holds no data. If you
751
+ find yourself putting example values in a schema, you wanted a table.
752
+ - Not a workflow constant: a constant belongs to ONE workflow and is edited in
753
+ its document. A table is shared, and three workflows reading the same rows is
754
+ the case it exists for.
755
+ - Not a function tool with a list inside it: that makes changing a row an act of
756
+ editing code, reviewing it and publishing a tool. A business user maintains a
757
+ table; nobody should need you to change a postcode.
758
+
759
+ **Static or dynamic — who owns the rows.**
760
+ - \`isDynamic: false\` (the default) is reference data the AUTHOR maintains. A
761
+ workflow reads it and cannot change it. \`allowedOperations\` must be empty:
762
+ a permission nothing honours is refused, not stored.
763
+ - \`isDynamic: true\` lets a workflow change the rows, limited to
764
+ \`allowedOperations\` — any of \`add\` / \`update\` / \`delete\`. READING IS
765
+ NEVER LISTED there: it is what a table is for and is always allowed.
766
+ - You edit rows through \`add_data_table_row\` / \`update_data_table_row\` /
767
+ \`delete_data_table_row\` whatever the table's mode says — those grants are
768
+ about what a RUN may do, not about authoring.
769
+
770
+ **Never put rows in \`update_data_table\`.** \`rows\` and \`columns\` are
771
+ whole-collection fields: sending one row REPLACES the table's content and
772
+ deletes everything else. The row tools address a single row by a match
773
+ (\`matchColumn\`/\`matchValue\`) and cannot touch the rest — use them. Reach for
774
+ \`update_data_table({ fields: { rows } })\` only when you genuinely mean to
775
+ replace the whole content, and never as a way to append.
776
+
777
+ **The rule that bites hardest: derived tools follow the PUBLISHED table.** A
778
+ published table mints its own CRUD tools, so granting an agent access to one is
779
+ ordinary tool granting — take a \`toolId\` from \`list_data_table_tools\` and put
780
+ it in the agent's \`toolIds\`. But those tools follow the table's PUBLISHED
781
+ version. An author who ticked "may add rows" and has not published has granted
782
+ nothing, and the tool that would let a run act on it does not exist yet.
783
+ \`list_data_table_tools\` reports \`offered\` (what the draft would yield),
784
+ \`toolId\` (whether a row exists) and \`isLive\` (whether a run can reach it)
785
+ separately for exactly this reason. Read all three before concluding a grant
786
+ landed. Same rule as everywhere else here — a draft changes nothing until it is
787
+ published — and it is the first thing an agent gets wrong about tables.
788
+
789
+ **Routing a decision on a table.** A decision can branch by looking a value up
790
+ in one column and taking the branch named in another, with
791
+ \`builtin: "evaluators.table_lookup"\`. The behaviour worth knowing, because no
792
+ catalogue states it: THE CELL'S VALUE IS THE BRANCH'S OUTCOME KEY — not a new
793
+ field, and not something you map afterwards. Every value in the result column
794
+ must be the outcome key of an outgoing branch, or publishing the workflow is
795
+ refused. The table must be PUBLISHED: a run reads the published snapshot, so a
796
+ table that is only saved routes nothing. For the argument names it reads, and
797
+ for every other selectable evaluator, read \`decisionEvaluators\` from
798
+ \`get_workflow_authoring_spec\` — generated from the registry that dispatches
799
+ them, so it cannot advertise one the platform would not run.
800
+
801
+ **Column kinds** come from the same place: \`tableColumnKinds\` in
802
+ \`get_workflow_authoring_spec\`. It is a FOURTH vocabulary beside the three for
803
+ parameters, outputs and schema fields, with its own spellings — do not carry a
804
+ value across from one of the others, and do not guess. Every column needs a
805
+ \`description\`: an agent reads it to know what the column is for, and a save
806
+ without one is refused.
807
+
808
+ **\`list_data_tables\` is PAGED**, alone among the library lists — a tenant's
809
+ reference data has no ceiling. Page one is not the library. Follow
810
+ \`nextCursor\` while \`hasMore\` is true, or better, narrow in the query:
811
+ \`name\` is exact and unique per workspace, so "does one called X already
812
+ exist" is a single call rather than a walk. The page carries \`rowCount\`, never
813
+ the rows; the rows come from \`read_data_table\`.
814
+
717
815
  ## Toolboxes — where a tool is filed
718
816
  - A toolbox is a per-tenant grouping label over tools. Read \`list_toolboxes\`
719
817
  before \`create_tool\` and pass the box's id as \`toolboxId\`; a tool created
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAg0BnB,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,2EAA2E;QACzE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,uEAAuE;QACvE,kBAAkB,EACpB,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAC1E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The parts of a table that are NOT the generic entity family (axonity-mcp#63).
3
+ *
4
+ * A table is an authored, typed, versioned library element that holds ROWS
5
+ * (axonity-flow#1217), and its routes were deliberately written in the same
6
+ * order and spelling as an output schema's — so list/read/create/update/delete/
7
+ * restore/discard-draft/request-publish and the whole eleven-route version
8
+ * family come from `registerEntityTools` and `registerVersionTools` with no code
9
+ * here. Two things do not fit that shape, and both are here:
10
+ *
11
+ * **1. Row writes.** `PUT /data-tables/{id}` replaces the WHOLE `rows` array.
12
+ * `update_data_table` takes a blind `fields` bag by design — the connector stays
13
+ * thin and the backend validates — which means an agent that passes `rows`
14
+ * meaning "add this one" silently destroys the table's content. That is a
15
+ * destructive default reachable by accident, so the three row routes
16
+ * axonity-flow#1235 added get explicit tools that address ONE row and cannot
17
+ * touch the others. `update_data_table` carries the warning as well
18
+ * (`updateWarning` on its `EntityDef`); the tools are what make the warning
19
+ * actionable rather than merely a caution.
20
+ *
21
+ * The row tools take no `expectedVersion`. That is the backend's contract, not
22
+ * an omission: a row write is a single addressed operation the service applies
23
+ * under its own lock, and it RETURNS the table's new `version` for a later
24
+ * `update_data_table` to base itself on. Adding a version argument here would
25
+ * invent a check the route does not make.
26
+ *
27
+ * **2. Which tools a table yields.** A published table mints its own CRUD tools,
28
+ * so granting an agent access to a table is ordinary tool granting rather than a
29
+ * second permission vocabulary. Their names follow a convention, which used to
30
+ * mean the only way to find them was to fetch the whole tool library and match
31
+ * on it. `list_data_table_tools` asks the table instead — and, crucially,
32
+ * reports the operations that are OFFERED but not yet LIVE, which is the answer
33
+ * to the first thing an author gets wrong: a table's tools follow its PUBLISHED
34
+ * version, so ticking "may add rows" and not publishing has granted nothing.
35
+ */
36
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
37
+ import type { AxonityClient } from "../client.js";
38
+ export declare function registerDataTableTools(server: McpServer, client: AxonityClient): void;
@@ -0,0 +1,129 @@
1
+ /**
2
+ * The parts of a table that are NOT the generic entity family (axonity-mcp#63).
3
+ *
4
+ * A table is an authored, typed, versioned library element that holds ROWS
5
+ * (axonity-flow#1217), and its routes were deliberately written in the same
6
+ * order and spelling as an output schema's — so list/read/create/update/delete/
7
+ * restore/discard-draft/request-publish and the whole eleven-route version
8
+ * family come from `registerEntityTools` and `registerVersionTools` with no code
9
+ * here. Two things do not fit that shape, and both are here:
10
+ *
11
+ * **1. Row writes.** `PUT /data-tables/{id}` replaces the WHOLE `rows` array.
12
+ * `update_data_table` takes a blind `fields` bag by design — the connector stays
13
+ * thin and the backend validates — which means an agent that passes `rows`
14
+ * meaning "add this one" silently destroys the table's content. That is a
15
+ * destructive default reachable by accident, so the three row routes
16
+ * axonity-flow#1235 added get explicit tools that address ONE row and cannot
17
+ * touch the others. `update_data_table` carries the warning as well
18
+ * (`updateWarning` on its `EntityDef`); the tools are what make the warning
19
+ * actionable rather than merely a caution.
20
+ *
21
+ * The row tools take no `expectedVersion`. That is the backend's contract, not
22
+ * an omission: a row write is a single addressed operation the service applies
23
+ * under its own lock, and it RETURNS the table's new `version` for a later
24
+ * `update_data_table` to base itself on. Adding a version argument here would
25
+ * invent a check the route does not make.
26
+ *
27
+ * **2. Which tools a table yields.** A published table mints its own CRUD tools,
28
+ * so granting an agent access to a table is ordinary tool granting rather than a
29
+ * second permission vocabulary. Their names follow a convention, which used to
30
+ * mean the only way to find them was to fetch the whole tool library and match
31
+ * on it. `list_data_table_tools` asks the table instead — and, crucially,
32
+ * reports the operations that are OFFERED but not yet LIVE, which is the answer
33
+ * to the first thing an author gets wrong: a table's tools follow its PUBLISHED
34
+ * version, so ticking "may add rows" and not publishing has granted nothing.
35
+ */
36
+ import { z } from "zod";
37
+ import { guard, jsonResult } from "./result.js";
38
+ const BASE = "/api/v1/data-tables";
39
+ /**
40
+ * How the two addressed row writes name their row.
41
+ *
42
+ * Deliberately a MATCH rather than a row index: a table's rows have no stable
43
+ * position, so "row 4" is a different row after anyone inserts one. The backend
44
+ * refuses a match that hits zero rows (404) or more than one (with the count)
45
+ * rather than guessing, which is what makes this safe to hand an agent.
46
+ */
47
+ const MATCH = {
48
+ matchColumn: z
49
+ .string()
50
+ .describe("The column that identifies the row. It must match EXACTLY ONE row: " +
51
+ "zero is a 404 and more than one is refused with the count, so a write " +
52
+ "never lands on a row you did not mean. Pick a column whose values are " +
53
+ "unique — read the table first if you are not sure."),
54
+ matchValue: z
55
+ .string()
56
+ .describe("The value that column must hold. Compared the way a decision compares " +
57
+ 'it over the same table, so "5000" finds the number 5000 and ' +
58
+ '"benelux" finds the cell holding "Benelux".'),
59
+ };
60
+ export function registerDataTableTools(server, client) {
61
+ server.tool("add_data_table_row", "Append ONE row to a table, without resending the rows already there. " +
62
+ "\n\nUSE THIS RATHER THAN update_data_table TO ADD A ROW. `rows` on " +
63
+ "update_data_table is a whole-collection field: sending one row there " +
64
+ "replaces the table's entire content. This appends, and cannot touch the " +
65
+ "other rows. " +
66
+ "\n\nA key that is not a column is REFUSED and named — never dropped, " +
67
+ "because a silently discarded value is a lost value. Read the table first " +
68
+ "for its column names and what each one means. " +
69
+ "\n\nThe response carries the table's new `version`: base a later " +
70
+ "update_data_table on that number rather than re-reading. " +
71
+ "\n\nThis writes the DRAFT. A run reads the published table, so the row " +
72
+ "is not live until the table is published (request_publish_data_table).", {
73
+ id: z.string().describe("The table's id."),
74
+ values: z
75
+ .record(z.unknown())
76
+ .describe("The row's values, keyed by COLUMN NAME (the column's `name`, not " +
77
+ "its label). Required columns must be present."),
78
+ }, async ({ id, values }) => guard(async () => jsonResult(await client.post(`${BASE}/${id}/rows`, { values }))));
79
+ server.tool("update_data_table_row", "Change named columns on the ONE row a match addresses. Columns you do not " +
80
+ "name keep their values, so this is a partial edit of a row rather than a " +
81
+ "replacement of it. " +
82
+ "\n\nUSE THIS RATHER THAN update_data_table TO EDIT A ROW — `rows` there " +
83
+ "replaces the whole content. " +
84
+ "\n\nAn empty `changes` is refused: an update that changes nothing is a " +
85
+ "mistake dressed as a success. The response reports `changed` — which " +
86
+ "columns actually moved — plus the table's new `version`. " +
87
+ "\n\nThis writes the DRAFT; publish before a run can see it.", {
88
+ id: z.string().describe("The table's id."),
89
+ ...MATCH,
90
+ changes: z
91
+ .record(z.unknown())
92
+ .describe("The columns to change and what to change them to, keyed by column " +
93
+ "name. Columns not named here keep their values. Must not be empty."),
94
+ }, async ({ id, matchColumn, matchValue, changes }) => guard(async () => jsonResult(await client.patch(`${BASE}/${id}/rows`, { changes }, { match_column: matchColumn, match_value: matchValue }))));
95
+ server.tool("delete_data_table_row", "Remove the ONE row a match addresses. " +
96
+ "\n\nTHE REMOVED ROW RIDES BACK IN THE RESPONSE, on purpose: after this " +
97
+ "call it is the only copy left, so an operator who deleted the wrong one " +
98
+ "can put it back with add_data_table_row. Keep it. " +
99
+ "\n\nUnlike delete_data_table this is NOT soft-deleted and there is no " +
100
+ "restore_*: the row is gone from the draft. The published table still has " +
101
+ "it until the table is published again, which is the only undo. " +
102
+ "\n\nThe response also carries the table's new `version` and `total`.", {
103
+ id: z.string().describe("The table's id."),
104
+ ...MATCH,
105
+ confirm: z
106
+ .literal(true)
107
+ .describe("Must be true. Acknowledges you understand this removes a row from " +
108
+ "the draft and that only the response carries it afterwards."),
109
+ }, async ({ id, matchColumn, matchValue }) => guard(async () => jsonResult(await client.del(`${BASE}/${id}/rows`, {
110
+ match_column: matchColumn,
111
+ match_value: matchValue,
112
+ }))));
113
+ server.tool("list_data_table_tools", "Which tools this table yields, and which of them a RUN can actually " +
114
+ "reach. Read-only. " +
115
+ "\n\nA published table mints its own CRUD tools, so giving an agent " +
116
+ "access to a table is ordinary tool granting — put a `toolId` from here " +
117
+ "in the agent's `toolIds`. Their names follow a convention, so the " +
118
+ "alternative is fetching the whole tool library and matching on it. " +
119
+ "\n\nREAD THE THREE FLAGS SEPARATELY — collapsing them is how \"I ticked " +
120
+ "'may add rows' and there is no tool\" becomes a mystery: " +
121
+ "`offered` is what the current DRAFT would yield (what the author " +
122
+ "decided), `toolId` is whether a tool row exists today (what a grant " +
123
+ "names), and `isLive` is whether that row is PUBLISHED (what a run can " +
124
+ "reach). A table's tools follow its published version, so a grant that " +
125
+ "has been saved and not published has granted nothing yet. " +
126
+ "\n\n`publishedMajorVersion: null` means the table has never been " +
127
+ "published and nothing here is live.", { id: z.string().describe("The table's id.") }, async ({ id }) => guard(async () => jsonResult(await client.get(`${BASE}/${id}/tools`))));
128
+ }
129
+ //# sourceMappingURL=dataTables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataTables.js","sourceRoot":"","sources":["../../src/tools/dataTables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC;;;;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E,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,4DAA4D;QAC5D,mEAAmE;QACnE,qCAAqC,EACvC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,EAC9C,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CACf,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC"}
@@ -143,9 +143,14 @@ export function registerAttachTools(server, client) {
143
143
  // `detached: true` and not one link had ever existed.
144
144
  link("skill", "workflow", (workflowId, skillId) => `/api/v1/workflows/${workflowId}/skills-v2/${skillId}`, "workflowId", "skillId", "list_workflow_skills");
145
145
  link("policy", "agent", (agentId, policyId) => `/api/v1/agents/${agentId}/policies/${policyId}`, "agentId", "policyId", "list_agent_policies");
146
- // Reference docs attach to agents only — there is no workflow-scoped
147
- // reference-doc route on the backend, so no `*_to_workflow` pair here.
148
146
  link("reference", "agent", (agentId, refId) => `/api/v1/agents/${agentId}/reference-docs/${refId}`, "agentId", "refId", "list_agent_reference_docs");
147
+ // Reference docs used to attach to agents ONLY, and this file said so. That
148
+ // is no longer true: axonity-flow#1061 gave them the workflow-scoped trio,
149
+ // mirroring `workflow_skills_router` exactly. Until then the process panel
150
+ // "attached" a doc by rewriting its `scope`, which the runtime ignores — a
151
+ // link nothing read, which is the same failure the skill read-back exists to
152
+ // make visible.
153
+ link("reference", "workflow", (workflowId, refId) => `/api/v1/workflows/${workflowId}/reference-docs/${refId}`, "workflowId", "refId", "list_workflow_reference_docs");
149
154
  /**
150
155
  * The read side of the links above. `attach_*`/`detach_*` write a link but
151
156
  * return nothing you can list later, so these are how an agent verifies a
@@ -196,33 +201,52 @@ export function registerAttachTools(server, client) {
196
201
  listLinks("policy", "policies", (id) => `/api/v1/agents/${id}/policies`, "policies");
197
202
  listLinks("reference_doc", "reference_docs", (id) => `/api/v1/agents/${id}/reference-docs`, "references");
198
203
  /**
199
- * The workflow-scoped read-back (axonity-flow#961 S8).
204
+ * The workflow-scoped read-backs (axonity-flow#961 S8, #1061).
200
205
  *
201
206
  * Deliberately without `linkSource`: unlike the agent view there is only one
202
- * way a skill reaches a workflow — an explicit link — so a field that always
203
- * says the same thing would train a reader to skip it. Live links only, for
204
- * the reason `list_agent_skills` gives: detaching closes the interval rather
205
- * than deleting the row, and a stale dependency list is worse than none.
207
+ * way a skill or a doc reaches a workflow — an explicit link — so a field
208
+ * that always says the same thing would train a reader to skip it. Live
209
+ * links only, for the reason `list_agent_skills` gives: detaching closes the
210
+ * interval rather than deleting the row, and a stale dependency list is
211
+ * worse than none.
206
212
  */
207
- server.tool("list_workflow_skills", "List the skills currently scoped to a WORKFLOW — the read-back for " +
208
- "attach_skill_to_workflow. A 200 from an attach does not prove the link " +
209
- "resolved, and the link lives outside the workflow document, so " +
210
- "read_workflow will never show it: this is the only way to tell an attach " +
211
- "that landed from one that silently did nothing. Read-only. " +
212
- "\n\nReturns IDENTITY by default; pass verbosity: \"full\" for whole " +
213
- "bodies, which a skill's playbook makes expensive.", {
214
- workflowId: z.string().describe("The workflow's id."),
215
- verbosity: z
216
- .enum(["identity", "full"])
217
- .optional()
218
- .describe('How much of each row to return. "identity" (default) is id, name, ' +
219
- 'description and status. "full" is the entire skill, body included.'),
220
- }, async ({ workflowId, verbosity }) => guard(async () => {
221
- const response = await client.get(`/api/v1/workflows/${workflowId}/skills-v2`);
222
- if (verbosity === "full")
223
- return jsonResult(response);
224
- return jsonResult(projectLinkRows(response, "skills"));
225
- }));
213
+ const listWorkflowLinks = (subject, plural, path,
214
+ /** The key the backend nests the rows under (`skills` / `references`). */
215
+ rowsKey,
216
+ /** Why "full" is expensive for this subject. */
217
+ fullCost,
218
+ /**
219
+ * The noun the attach/detach pair is named with. It is NOT always the
220
+ * subject: the doc link is `attach_reference_to_workflow` while the
221
+ * read-back is `list_workflow_reference_docs`, an asymmetry inherited from
222
+ * the agent-scoped pair and kept so both halves of a family are spelled the
223
+ * same way. Pointing at the wrong name is worse than not pointing at all.
224
+ */
225
+ attachNoun) => {
226
+ server.tool(`list_workflow_${plural}`, `List the ${plural.replace("_", " ")} currently scoped to a WORKFLOW — ` +
227
+ `the read-back for attach_${attachNoun}_to_workflow. A 200 from an attach ` +
228
+ `does not prove the link resolved, and the link lives outside the ` +
229
+ `workflow document, so read_workflow will never show it: this is the ` +
230
+ `only way to tell an attach that landed from one that silently did ` +
231
+ `nothing. Read-only. ` +
232
+ `\n\nReturns IDENTITY by default; pass verbosity: "full" for whole ` +
233
+ `bodies, which ${fullCost}.`, {
234
+ workflowId: z.string().describe("The workflow's id."),
235
+ verbosity: z
236
+ .enum(["identity", "full"])
237
+ .optional()
238
+ .describe('How much of each row to return. "identity" (default) is id, name, ' +
239
+ `description and status. "full" is the entire ${subject}, body ` +
240
+ "included."),
241
+ }, async ({ workflowId, verbosity }) => guard(async () => {
242
+ const response = await client.get(path(workflowId));
243
+ if (verbosity === "full")
244
+ return jsonResult(response);
245
+ return jsonResult(projectLinkRows(response, rowsKey));
246
+ }));
247
+ };
248
+ listWorkflowLinks("skill", "skills", (id) => `/api/v1/workflows/${id}/skills-v2`, "skills", "a skill's playbook makes expensive", "skill");
249
+ listWorkflowLinks("reference_doc", "reference_docs", (id) => `/api/v1/workflows/${id}/reference-docs`, "references", "a reference doc's content makes expensive", "reference");
226
250
  }
227
251
  /**
228
252
  * "What breaks if I change this" — the reverse look-up, for both halves of the
@@ -1 +1 @@
1
- {"version":3,"file":"extras.js","sourceRoot":"","sources":["../../src/tools/extras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,KA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,CACR,MAAM,MAAM,CAAC,GAAG,CACd;QACE,GAAG,EAAE,mBAAmB;QACxB,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,wBAAwB;QAC9B,QAAQ,EAAE,4BAA4B;KACvC,CAAC,IAAI,IAAI,KAAK,CAAC,CACjB,CACF,CACF,CACJ,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,eAAe,EACf,4EAA4E;QAC1E,wDAAwD,EAC1D,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC,EAAE,EAC9E,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CACvB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,CAAC,CAAC,CAChE,CACJ,CAAC;AACJ,CAAC"}
@@ -110,5 +110,39 @@ export interface EntityDef {
110
110
  * any. Omit for an entity whose list route takes no parameters.
111
111
  */
112
112
  listFilters?: ListFilter[];
113
+ /**
114
+ * Set when `list_<plural>` answers ONE PAGE on the shared keyset cursor
115
+ * rather than the whole collection.
116
+ *
117
+ * Every other entity list is `# paging-exempt` on the backend — a library
118
+ * grows by deliberate authoring, so page one IS the answer — and this
119
+ * registrar was written for that. `data_table` is the first that is not, and
120
+ * the reasoning genuinely does not transfer: a tenant's reference DATA has no
121
+ * ceiling. Handing back page one as if it were the library is #37 exactly:
122
+ * nothing crashes, the agent just reports on twenty tables and says nothing
123
+ * about the rest.
124
+ *
125
+ * So the tool takes `limit`/`cursor`, forwards the envelope WHOLE (unwrapping
126
+ * to `items` would rebuild the silent truncation one layer up), and says in
127
+ * its own description that it is a page and how to reach the next one — the
128
+ * same contract `list_runs` carries, not a second one.
129
+ */
130
+ listPaging?: {
131
+ /** Page size the route applies when the caller asks for none. */
132
+ defaultPageSize: number;
133
+ /** Ceiling the route clamps to. */
134
+ maxPageSize: number;
135
+ };
136
+ /**
137
+ * Appended to `update_<entity>`'s description when this entity has a field a
138
+ * blind `fields` bag can destroy.
139
+ *
140
+ * `fields` is deliberately untyped — the backend validates it and the
141
+ * connector stays thin — but that means an agent can pass a whole-collection
142
+ * field meaning "add this one". On `data_table.rows` that silently replaces
143
+ * the table's content. A destructive default an agent can reach by accident
144
+ * is not acceptable unlabelled, so the entity that has one says so here.
145
+ */
146
+ updateWarning?: string;
113
147
  }
114
148
  export declare function registerEntityTools(server: McpServer, client: AxonityClient, def: EntityDef): void;
@@ -34,23 +34,61 @@ export function registerEntityTools(server, client, def) {
34
34
  const creatable = def.creatable !== false;
35
35
  const readable = def.readable !== false;
36
36
  const listFilters = def.listFilters ?? [];
37
- server.tool(`list_${plural}`, `List all ${label} in your Axonity tenant (id, name, status, version).` +
37
+ const paging = def.listPaging;
38
+ server.tool(`list_${plural}`, `List ${paging ? "" : "all "}${label} in your Axonity tenant (id, name, status, version).` +
38
39
  (listFilters.length > 0
39
40
  ? ` Narrow it with ${listFilters
40
41
  .map((f) => `\`${f.arg}\``)
41
42
  .join(" / ")} — the filter is applied by the backend, so it answers ` +
42
43
  `the narrower question rather than handing you everything to sift.`
43
- : ""), Object.fromEntries(listFilters.map((filter) => [
44
- filter.arg,
45
- (filter.type === "boolean" ? z.boolean() : z.string())
46
- .optional()
47
- .describe(filter.description),
48
- ])), async (args) => guard(async () => {
49
- // No filters declared → call the route exactly as before, with no query
50
- // argument at all rather than an empty one.
51
- if (listFilters.length === 0)
44
+ : "") +
45
+ (paging
46
+ ? `\n\nTHE RESPONSE IS ONE PAGE, NOT THE WHOLE LIBRARY: ` +
47
+ `{ items, nextCursor, pageSize, hasMore }. Default page size is ` +
48
+ `${paging.defaultPageSize}, max ${paging.maxPageSize}. While hasMore ` +
49
+ `is true you have NOT seen every one — pass the response's nextCursor ` +
50
+ `back as cursor and repeat until nextCursor is null. Concluding ` +
51
+ `anything from a single page with hasMore: true ("there is no table ` +
52
+ `called X", "there are four") gives a confidently wrong answer. ` +
53
+ `\n\nBEFORE YOU WALK IT, TRY A FILTER: the narrowings above are ` +
54
+ `applied in the query, so "does one called X already exist" is one ` +
55
+ `call rather than a drain of every page. Never build a cursor — echo ` +
56
+ `back the one you were given.`
57
+ : ""), {
58
+ ...Object.fromEntries(listFilters.map((filter) => [
59
+ filter.arg,
60
+ (filter.type === "boolean" ? z.boolean() : z.string())
61
+ .optional()
62
+ .describe(filter.description),
63
+ ])),
64
+ ...(paging
65
+ ? {
66
+ limit: z
67
+ .number()
68
+ .int()
69
+ .optional()
70
+ .describe(`Page size. Defaults to ${paging.defaultPageSize}, clamped to ` +
71
+ `${paging.maxPageSize} — asking for more is not an error and ` +
72
+ `does not get you more.`),
73
+ cursor: z
74
+ .string()
75
+ .optional()
76
+ .describe("Opaque continuation cursor from the previous response's " +
77
+ "nextCursor. Omit for the first page. Do not parse or " +
78
+ "construct one."),
79
+ }
80
+ : {}),
81
+ }, async (args) => guard(async () => {
82
+ // No filters and no paging → call the route exactly as before, with no
83
+ // query argument at all rather than an empty one.
84
+ if (listFilters.length === 0 && !paging) {
52
85
  return jsonResult(await client.get(basePath));
53
- return jsonResult(await client.get(basePath, Object.fromEntries(listFilters.map((filter) => [filter.query, args[filter.arg]]))));
86
+ }
87
+ // The page envelope is forwarded WHOLE — see `listPaging`.
88
+ return jsonResult(await client.get(basePath, {
89
+ ...Object.fromEntries(listFilters.map((filter) => [filter.query, args[filter.arg]])),
90
+ ...(paging ? { limit: args.limit, cursor: args.cursor } : {}),
91
+ }));
54
92
  }));
55
93
  if (readable) {
56
94
  server.tool(`read_${singular}`, `Read one ${singular} by id, including its current draft and version. ` +
@@ -71,7 +109,8 @@ export function registerEntityTools(server, client, def) {
71
109
  }
72
110
  server.tool(`update_${singular}`, `Update a ${singular} draft. Read it first to get \`expectedVersion\`; on a ` +
73
111
  `409 conflict, read again and retry. Pass only the fields you are ` +
74
- `changing (camelCase) in \`fields\`.`, {
112
+ `changing (camelCase) in \`fields\`.` +
113
+ (def.updateWarning ? `\n\n${def.updateWarning}` : ""), {
75
114
  id: z.string().describe(`The ${singular}'s id.`),
76
115
  expectedVersion: z
77
116
  .number()
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/tools/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,OAAO,GAAG,CAAC;KACd,OAAO,CAAC,IAAI,CAAC;KACb,QAAQ,CAAC,gEAAgE,CAAC,CAAC;AA4F9E,MAAM,UAAU,mBAAmB,CACjC,MAAiB,EACjB,MAAqB,EACrB,GAAc;IAEd,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;IACrE,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,QAAQ,GAAG,CAAC;IAC5C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,KAAK,KAAK,CAAC;IAC9C,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,KAAK,KAAK,CAAC;IAC1C,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,KAAK,KAAK,CAAC;IAExC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;IAE1C,MAAM,CAAC,IAAI,CACT,QAAQ,MAAM,EAAE,EAChB,YAAY,KAAK,sDAAsD;QACrE,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,mBAAmB,WAAW;iBAC3B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;iBAC1B,IAAI,CAAC,KAAK,CAAC,yDAAyD;gBACvE,mEAAmE;YACrE,CAAC,CAAC,EAAE,CA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