@axonity-ai/mcp 0.12.0 → 0.14.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
@@ -40,9 +40,12 @@ tenant + scope on every call, so the connector is not a trust boundary.
40
40
 
41
41
  ## Tools
42
42
 
43
- 345 tools total. `axonity_conventions` (read this first) covers the authoring
43
+ 346 tools total. `axonity_conventions` (read this first) covers the authoring
44
44
  rules — drafts vs live, optimistic locking, per-entity fields, delete/restore,
45
45
  and how to tell a retryable error from one that will never succeed.
46
+ `axonity_semantic_conventions` is its counterpart for one job only: building a
47
+ workspace's semantic layer. Both serve the platform's own rules, read live —
48
+ there is no copy of them in this repository.
46
49
 
47
50
  What the connector does **not** state is as deliberate as what it does: the
48
51
  mutation commands, the step types, the trigger types, the schedule-rule shapes
@@ -73,6 +76,12 @@ Exceptions: `persona` has no `create_persona` (create only via
73
76
  `create_agent_persona`). And `list_data_tables` answers **one page**, not the
74
77
  whole library — see Tables below.
75
78
 
79
+ Three more entities use the same verbs **without** the draft ones —
80
+ **data_source, table_relationship, dashboard**. None is versioned: a change is
81
+ live when it is saved, so there is no `discard_*_draft` and no
82
+ `request_publish_*`. Their lists are paged like `list_data_tables`. See
83
+ Warehouses and dashboards below.
84
+
76
85
  Some list routes narrow in the query, which is where narrowing belongs — the
77
86
  backend applies it before the rows come back:
78
87
  `list_workflows({ stageId?, capabilityId? })`,
@@ -80,7 +89,9 @@ backend applies it before the rows come back:
80
89
  `list_policies({ scope?, ownerId? })`,
81
90
  `list_reference_docs({ scope?, ownerId? })`,
82
91
  `list_prompt_snippets({ deleted? })`,
83
- `list_data_tables({ name?, status?, isDynamic? })`.
92
+ `list_data_tables({ name?, status?, isDynamic? })`,
93
+ `list_data_sources({ enabled? })`,
94
+ `list_table_relationships({ tableId? })`.
84
95
 
85
96
  That table is **generated** from the pinned schema's own query parameters
86
97
  (`npm run generate:filters` → `src/generated/listFilters.ts`), not hand-listed.
@@ -244,6 +255,35 @@ across these routes — the tool parameter names say which.
244
255
  would yield), `toolId` (whether a row exists) and `isLive` (whether a run
245
256
  can reach it) separately — an author who ticked "may add rows" and has not
246
257
  published has granted nothing yet.
258
+ - **Warehouses and dashboards** (`data_source`, `table_relationship`,
259
+ `dashboard`, measures): a workspace connects a warehouse such as BigQuery,
260
+ syncs fill dynamic tables from it on a schedule, and dashboards show
261
+ measures over those tables.
262
+ - **Most writes here are administrator-only on the platform, and a service
263
+ token always counts as a member.** Creating, changing, testing or querying
264
+ a data source, every sync write and every relationship write answer 403
265
+ "Only administrators can perform this action" to a token today. The tools
266
+ say so in their descriptions, and the error says *administrator only*
267
+ rather than the usual "your token is read-only" — the opposite advice.
268
+ Reads, dashboards and measures are open to a member.
269
+ - `list_data_source_drivers` first: each warehouse's `configFields` are the
270
+ keys `create_data_source` takes in `config`, so nothing about BigQuery is
271
+ hard-coded here and a new warehouse works without a connector release.
272
+ The warehouse key lives in a vault secret a human fills; the source points
273
+ at it by `secretId`.
274
+ - `test_data_source` answers `{ ok, message }` — a failure is an answer, not
275
+ an error. `read_data_source_schema` reads the warehouse's catalogue for
276
+ free. `query_data_source` runs read-only SQL with capped rows
277
+ (`truncated` says when rows were left out); a 422 is the query being
278
+ refused, a 502 is the warehouse.
279
+ - Syncs: `list_data_source_syncs`, `create_data_source_sync`,
280
+ `run_data_source_sync` (brings the run forward; does not wait for it),
281
+ `delete_data_source_sync`, `restore_data_source_sync` (comes back off).
282
+ - Measures: `read_measure_design` (what a table can be asked),
283
+ `query_measures` (up to 40 questions, each answered on its own),
284
+ `list_measure_rows` (a list tile). Plus `duplicate_dashboard`.
285
+ - A `source_query` knowledge note names its source in `subjectSourceId` on
286
+ `create_reference_doc`.
247
287
  - `list_deleted_prompt_snippets` calls `/api/v1/prompt-snippets/deleted`; the
248
288
  backend returns it as `{ items: [... ] }`, and the tool forwards that response
249
289
  unchanged.
package/dist/errors.js CHANGED
@@ -157,13 +157,31 @@ export class AuthError extends AxonityApiError {
157
157
  this.name = "AuthError";
158
158
  }
159
159
  }
160
+ /**
161
+ * The backend's sentence for a route behind `require_admin`.
162
+ *
163
+ * Matched on the words because the envelope's `code` is plain `forbidden` for
164
+ * this and for a missing scope alike, and the two need opposite advice: a
165
+ * scope can be granted on the token, administrator rights cannot — a service
166
+ * token always resolves as a member. Telling an agent "a read-only token
167
+ * cannot…" here sends it and its human to the token settings for something no
168
+ * token setting fixes (#78).
169
+ */
170
+ const ADMIN_ONLY_SENTENCE = /only administrators/i;
160
171
  /** 403 — the token lacks the scope for this action (e.g. read-only on a write). */
161
172
  export class ForbiddenError extends AxonityApiError {
162
173
  constructor(body) {
163
174
  const env = asEnvelope(body);
164
- super(withDetail("Forbidden (403): this service token is not allowed to perform that action. " +
165
- "A read-only token cannot create, update, delete, or request-publish, and no " +
166
- "token may publish directly — use request_publish_* and let a human approve.", body), 403, body, env?.code ?? "forbidden", env?.retryable ?? false);
175
+ const adminOnly = ADMIN_ONLY_SENTENCE.test(describeBody(body) ?? "");
176
+ super(withDetail(adminOnly
177
+ ? "Forbidden (403): ADMINISTRATOR ONLY. This action is reserved for a " +
178
+ "workspace administrator, and a service token always counts as a " +
179
+ "member — so no token can do it, whatever its scopes. This is not a " +
180
+ "mistake in your call and retrying will not help. Tell your human: " +
181
+ "an administrator can do it in Axonity."
182
+ : "Forbidden (403): this service token is not allowed to perform that action. " +
183
+ "A read-only token cannot create, update, delete, or request-publish, and no " +
184
+ "token may publish directly — use request_publish_* and let a human approve.", body), 403, body, env?.code ?? "forbidden", env?.retryable ?? false);
167
185
  this.name = "ForbiddenError";
168
186
  }
169
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkCH,4FAA4F;AAC5F,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,GAAG,CAAC;IAC7D,kBAAkB;IAClB,cAAc;IACd,8BAA8B;CAC/B,CAAC,CAA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AE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;QAC5B,OAAO,IAAI,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -94,5 +94,21 @@ export const LIST_FILTERS = {
94
94
  description: "true: only tables a workflow may change. false: only reference data the author maintains. Omit for both.",
95
95
  },
96
96
  ],
97
+ "data_source": [
98
+ {
99
+ arg: "enabled",
100
+ query: "enabled",
101
+ type: "boolean",
102
+ description: "true: only sources that are switched on. false: only the ones switched off. Omit for both.",
103
+ },
104
+ ],
105
+ "table_relationship": [
106
+ {
107
+ arg: "tableId",
108
+ query: "table_id",
109
+ type: "string",
110
+ description: "Only relationships that touch this table, on either side. The way to answer \"what does this table join to\" without walking every page.",
111
+ },
112
+ ],
97
113
  };
98
114
  //# sourceMappingURL=listFilters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listFilters.js","sourceRoot":"","sources":["../../src/generated/listFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiC;IACxD,UAAU,EAAE;QACV;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;SACzG;QACD;YACE,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kFAAkF;SACrF;KACF;IACD,OAAO,EAAE;QACP;YACE,GAAG,EAAE,eAAe;YACpB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,uNAAuN;SAC1N;KACF;IACD,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0PAA0P;SAC7P;QACD;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uGAAuG;SAC1G;KACF;IACD,eAAe,EAAE;QACf;YACE,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0PAA0P;SAC7P;QACD;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uGAAuG;SAC1G;KACF;IACD,gBAAgB,EAAE;QAChB;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,oKAAoK;SACvK;KACF;IACD,YAAY,EAAE;QACZ;YACE,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,gOAAgO;SACnO;QACD;YACE,GAAG,EAAE,QAAQ;YACb,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2JAA2J;SAC9J;QACD;YACE,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,0GAA0G;SAC7G;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"listFilters.js","sourceRoot":"","sources":["../../src/generated/listFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiC;IACxD,UAAU,EAAE;QACV;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;SACzG;QACD;YACE,GAAG,EAAE,cAAc;YACnB,KA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AE,SAAS;YACf,WAAW,EACT,4FAA4F;SAC/F;KACF;IACD,oBAAoB,EAAE;QACpB;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0IAA0I;SAC7I;KACF;CACF,CAAC"}
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import { AxonityClient } from "./client.js";
23
23
  import { loadConfig } from "./config.js";
24
24
  import { reportContractSkew } from "./contract.js";
25
25
  import { registerConventions } from "./tools/conventions.js";
26
+ import { ADMIN_ONLY, registerDashboardTools, registerDataSourceTools, registerMeasureTools, } from "./tools/dataSources.js";
26
27
  import { registerDataTableTools } from "./tools/dataTables.js";
27
28
  import { assertPlaceholderCredentials } from "./tools/credentials.js";
28
29
  import { registerAttachTools, registerCatalogTools, registerConnectorTools, registerDependencyTools, registerPersonaTools, } from "./tools/extras.js";
@@ -149,6 +150,77 @@ const ENTITIES = [
149
150
  "which address a single row and cannot destroy the rest. Use `rows` here " +
150
151
  "only when you genuinely mean to replace the whole content.",
151
152
  },
153
+ // The three below arrived with axonity-flow#1849 (axonity-mcp#78). None is
154
+ // versioned or publish-approved: a change is live the moment it is saved, so
155
+ // there is no draft to discard and no request_publish_*. Each lists one page
156
+ // on the shared cursor, and the writes on the first two are administrator-
157
+ // only — see `ADMIN_ONLY` in tools/dataSources.ts.
158
+ {
159
+ singular: "data_source",
160
+ basePath: "/api/v1/data-sources",
161
+ updateMethod: "PUT",
162
+ label: "data sources (warehouses the workspace may read, e.g. BigQuery)",
163
+ publishable: false,
164
+ hasDiscardDraft: false,
165
+ deleteVersionParam: "expected_version",
166
+ listPaging: { defaultPageSize: 20, maxPageSize: 200 },
167
+ createNote: "CALL list_data_source_drivers FIRST. `sourceType` is a driver's " +
168
+ "`driverId` (default \"bigquery\"), and `config` takes exactly the keys " +
169
+ "that driver's `configFields` name — do not guess them. `secretId` " +
170
+ "points at the vault secret holding the warehouse key; a human puts the " +
171
+ "key there, never you, and the source never carries the key itself. A " +
172
+ "source may be created without one and tested once it has it. " +
173
+ "`policy` holds the limits every query is held to " +
174
+ "(maxBytesBilled, maxSeconds, allowedDatasets, forbiddenDatasets, " +
175
+ "personalColumns, dateFilters); all are empty by default. " +
176
+ "\n\nThen test_data_source to see whether it answers. A `source_query` " +
177
+ "knowledge note (create_reference_doc with kind source_query) names " +
178
+ "this source by its id in `subjectSourceId`." +
179
+ ADMIN_ONLY,
180
+ updateWarning: "NO DRAFT: this changes the live source, which every sync and query " +
181
+ "uses at once. `config` and `policy` are replaced WHOLE when sent — " +
182
+ "read first and send the complete block." +
183
+ ADMIN_ONLY,
184
+ },
185
+ {
186
+ singular: "table_relationship",
187
+ basePath: "/api/v1/table-relationships",
188
+ updateMethod: "PUT",
189
+ label: "table relationships (how two tables join, for measures across them)",
190
+ publishable: false,
191
+ hasDiscardDraft: false,
192
+ deleteVersionParam: "expected_version",
193
+ listPaging: { defaultPageSize: 20, maxPageSize: 200 },
194
+ createNote: "Fields: `fromTableId` + `fromColumn` (the MANY side — the facts, e.g. " +
195
+ "orders), `toTableId` + `toColumn` (the ONE side — e.g. countries), " +
196
+ "`cardinality` (many_to_one, the default, or one_to_one; there is no " +
197
+ "many-to-many, it has no safe join) and an optional `description`. A " +
198
+ "declaration that would make a total ambiguous — a second path between " +
199
+ "the same two tables, say — is refused with a 422 that says why. Read " +
200
+ "the sentence; it is the point." +
201
+ ADMIN_ONLY,
202
+ updateWarning: "Only `verified` (somebody checked that the keys really match) and " +
203
+ "`description` can change. To change the columns, delete and declare " +
204
+ "it again." +
205
+ ADMIN_ONLY,
206
+ },
207
+ {
208
+ singular: "dashboard",
209
+ basePath: "/api/v1/dashboards",
210
+ updateMethod: "PUT",
211
+ label: "dashboards (tiles of measures over the workspace's tables)",
212
+ publishable: false,
213
+ hasDiscardDraft: false,
214
+ deleteVersionParam: "expected_version",
215
+ listPaging: { defaultPageSize: 20, maxPageSize: 200 },
216
+ createNote: "Fields: `name`, `description`, `visibility` (\"workspace\", the " +
217
+ "default — everyone sees it — or \"private\") and `layout`, the " +
218
+ "sections of tiles; omit it for an empty dashboard. A tile names a " +
219
+ "measure by the id or name read_measure_design returns. The layout is " +
220
+ "checked when saved and a refusal names what is wrong.",
221
+ updateWarning: "NO DRAFT: a saved dashboard is what everyone it is shared with sees. " +
222
+ "`layout` is replaced WHOLE when sent — read first and send it complete.",
223
+ },
152
224
  ];
153
225
  /**
154
226
  * Entities with version history. Every authored entity here exposes the
@@ -217,6 +289,9 @@ export function registerAll(server, client) {
217
289
  registerToolboxTools(server, client);
218
290
  registerOperationsTools(server, client);
219
291
  registerDataTableTools(server, client);
292
+ registerDataSourceTools(server, client);
293
+ registerMeasureTools(server, client);
294
+ registerDashboardTools(server, client);
220
295
  registerComponentTools(server, client);
221
296
  }
222
297
  export function buildServer(client) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB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C7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -38,17 +38,23 @@
38
38
  * leave prompt elements alone; it never substitutes a local copy, because a
39
39
  * local copy is what went wrong. The prompt-SNIPPET mechanics (attach, reorder,
40
40
  * wildcard) stay below — those are how the API works, not where things go.
41
+ *
42
+ * THE SEMANTIC-KNOWLEDGE RULES ARE THE PLATFORM'S TOO, and go the same way —
43
+ * live from `GET /api/v1/authoring/semantic-knowledge`, never a local copy —
44
+ * with one difference: they are NOT appended to every call. They only matter to
45
+ * an agent building a workspace's semantic layer, so they get their own tool,
46
+ * `axonity_semantic_conventions`, and this guide carries one line pointing at
47
+ * it. Findable for whoever needs them, free for everyone else.
41
48
  */
42
49
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
43
50
  import type { AxonityClient } from "../client.js";
44
- export declare const CONVENTIONS = "# Authoring conventions for Axonity entities\n\nRead this before creating or updating anything.\n\n## What this connector is for\n- AUTHORING: composing an entity from intent \u2014 drafting a tool, an agent, a\n workflow, and wiring them together so the result is CORRECT and COMPLETE\n (every required field set, every reference pointing at something real).\n- REPRODUCING a setup is just authoring it again, from scratch. To recreate an\n agent/workflow/tool, CREATE NEW entities and wire them by their NEW ids \u2014\n never reuse an id you read. There is no \"migration\" and no \"import an id\":\n this connector only ever acts in the ONE tenant its token points at (see\n Tenant), and ids are tenant-local, so an id from anywhere else points at\n nothing (or the wrong thing) here. Read the source for its SHAPE and intent \u2014\n names, field values, which tools an agent uses, which agents a workflow's\n steps run \u2014 then build fresh and capture the ids the create calls return.\n Recreating into a DIFFERENT tenant means running that build while the\n connector is configured with THAT tenant's token \u2014 a separate session. See\n \"Reproducing a setup\" below.\n\n## The authoring loop\n1. `read_*` the entity (and `read_*_published` if you need to see what is live).\n2. Edit the DRAFT: `update_*`, or workflow-edit tools for workflow structure.\n3. Validate before publish: `validate_workflow` / `analyze_workflow_reachable_outputs` / \n `validate_tool_code` / `format_tool_code`. These four are stateless and work with\n read-only tokens.\n4. Re-read and verify with a saved tool command: `execute_tool` /\n `execute_stored_connector`.\n5. Fix any issues and re-read again.\n6. For a code tool, PROVE it: `dry_run_tool` \u2014 see \"Proving a tool\" below. Skip\n this and `request_publish_tool` will sit blocked forever.\n7. `request_publish_*` \u2014 this only QUEUES a human approval. Publishing many\n entities at once (taking a tenant live) is `request_publish_bulk`, up to 200\n in one call; it is not transactional, so read the per-entry results.\n8. `list_publish_approvals` / `get_publish_approval` to see whether it was\n approved or rejected. Readiness there is recomputed as you read it\n (`readiness` now, `readinessAtRequest` then, `readinessChanged` if it\n moved), so a blocker you saw earlier may already be gone.\n\n9. If something went wrong:\n - Bad edit, entity still exists \u2192 `list_*_versions` then `restore_*_version`\n to roll the draft back to an earlier version.\n - Never published, want a clean slate \u2192 `discard_*_draft` resets the draft to\n the last published state (fails if it was never published \u2014 there's nothing\n to fall back to).\n - Deleted by mistake \u2192 `restore_*` (see \"Delete is recoverable\" below).\n\n## Proving a tool (the publish gate)\nBefore a code tool may be published, the platform requires that its stored code\nhas run cleanly once, at its current version.\n- `dry_run_tool(toolId)` is the run that counts. It executes the tool's OWN\n saved implementation; you supply only sample input. A clean pass clears the\n `dry_run_required` blocker.\n- `execute_tool` does NOT count, however green it comes back. It runs the\n functions YOU pass, which need not be what is stored \u2014 proving nothing about\n what would ship. Use it while drafting code you have not saved yet.\n- Editing the tool afterwards bumps its version and invalidates the proof, so\n dry-run AFTER your last edit.\n- Connectors, builtin-backed validators and platform-shipped tools have no code\n of their own to prove and will refuse (422/403). That is expected, not a\n failure to work around.\n\n## Drafts, not live\n- `create_*` and `update_*` produce a DRAFT. The live runtime is unaffected\n until a human publishes it in Axonity. `flow` has the same rule: runtime uses\n the published snapshot from `read_flow_published` until `request_publish_flow`\n is approved.\n- You cannot publish directly \u2014 the backend refuses a direct publish from a service\n token with a 403, so there is no tool for it and no way around it.\n- A read-only token can only read: any write returns 403. If you see that, ask\n your human for a write-scoped token rather than retrying.\n- `request_publish_*` does NOT publish \u2014 it creates a pending approval a human\n approves in Axonity. Use it when a draft is ready; then tell the user to\n approve it in their Axonity approvals inbox.\n\n## Optimistic locking (always read-then-write)\n- Before `update_*`, call `read_*` and use the `version` you get as\n `expectedVersion` \u2014 in the request BODY. If the update returns a 409\n conflict, someone else changed it \u2014 read again and re-apply your change onto\n the new version.\n- `delete_*` also takes `expectedVersion`, but as an argument on the tool call\n only \u2014 the connector maps it to whatever query-parameter spelling that\n entity's route actually expects (it differs per entity on the wire; you never\n need to know which).\n- `restore_*` and `restore_deleted_*_version` take NO version at all \u2014 a\n restore must never lose to a stale-version guard.\n\n## Errors: branch on the failure, not the words\n- Every error names what went wrong as plainly as the backend allows. For a 409\n specifically, two different problems share that status code and need\n different responses:\n - **Version conflict** \u2014 you had a stale read. Re-read, re-apply, retry.\n - **Reference conflict** \u2014 the entity is referenced by something published or\n live. Retrying will never help. Detach the reference or unpublish the\n referencing entity first.\n The error message tells you which one you hit \u2014 read it, don't assume 409\n always means \"retry.\"\n- A 403 on any write means the token is read-only, or (for a direct publish\n attempt, which no tool makes) that publishing must go through\n `request_publish_*`. Either way: stop, don't retry, tell your human.\n- A 401 means the service token is dead \u2014 missing, wrong, expired, or revoked.\n **The backend deliberately returns the identical message for all four\n causes** so it doesn't leak which applies; you have no way to tell them\n apart and no way to check a token's remaining lifetime in advance (every\n token now expires \u2014 7, 15, 30, 60 or 90 days, chosen when it was minted;\n there is no \"never\"). On any 401: stop, do not retry, and tell your human\n plainly that the configured token is no longer valid and a new one must be\n minted from Axonity \u2192 Settings \u2192 API tokens. Do not guess or imply the cause.\n\n## Field shape\n- All fields are camelCase JSON (e.g. `capabilityTier`, not `capability_tier`).\n ONE documented exception: validator specs (`permissions.outputValidators`,\n `permissions.exposedValidatorTools`) use snake_case keys (`function`,\n `target`, `args`, `when_present`, `inputs`, `error_message`,\n `tool_name`, `validator_name`) \u2014 they are the same shape at every level and\n are stored verbatim, so they are NOT camel-aliased. Send them in snake_case.\n What those keys MEAN, and how a validator is bound to what it judges, is the\n Validators section.\n- `update_*` is a partial change for agents/tools and a partial patch for\n workflows: send only the fields you are changing (plus `expectedVersion`).\n- The backend validates fields; a 422 error names the offending field and why\n (e.g. `body.capabilityTier: Input should be 'economy', 'standard', 'smart' or\n 'reasoning'`). Fix that field and retry \u2014 do not guess at the whole shape.\n- **create/update for tool and agent are STRICT** (`extra=\"forbid\"`): an\n undeclared OR MISSPELLED key is a 422 that names it, not a silent drop. So\n spelling matters and you get told when it is wrong \u2014 good. Other entities are\n more lenient and may drop an unknown key silently; never rely on that.\n- `agent.tags` is a free label for grouping and reporting. It GATES NOTHING \u2014\n what reaches an agent's prompt is a LINK (`attach_policy_to_agent`), visible\n in a table a human can read and edit. A role-tag gate on a policy used to\n decide that invisibly and is refused outright now: sending\n `activation.tags` to `create_policy`/`update_policy` is a 422. The two\n surviving gates, `activation.tools` and `activation.delegation`, each say\n something a link cannot \u2014 \"only on turns where this agent holds this tool\",\n and \"only when (not) delegated\".\n\n## After you write, verify\n- A 200 means the request was accepted, NOT that it did what you meant. Re-read\n the entity after a mutation and diff it against your intent \u2014 a partial update\n only changes what you sent, and on the lenient (non-tool/agent) entities an\n unknown key can be dropped silently rather than rejected.\n- Re-reading the ENTITY is not enough for an `attach_*`: those links are stored\n outside the entity body and never appear in `read_agent`. Read them back with\n `list_agent_skills` / `list_agent_policies` / `list_agent_reference_docs`\n (see Wiring, mechanism B).\n- \"Complete\" is your job, not the backend's. A create succeeds with only the\n required fields set; it does not tell you the entity is USABLE. An agent with\n no `toolIds` runs with no tools; a connector tool with an empty\n `implementation` has no endpoint to call; a workflow with steps but no\n trigger never fires. After creating, check the entity has everything its\n purpose needs \u2014 see the per-entity and wiring sections.\n- To test a whole workflow end to end, `start_workflow_run` then read the result\n (`read_run` / `read_run_trace` / `read_run_cost`). Note it runs the PUBLISHED\n workflow and really executes (cost, connector side effects), so publish first,\n and only test-run when a human is expecting it.\n - Read `read_workflow_trigger_parameters` first and pass `triggerId`: a\n workflow can have several starts, each with different fields, and omitting\n it fires whichever comes first. Never send a parameter marked `pinned` \u2014\n the author owns that value and it is overwritten anyway.\n - **A run can park instead of finishing.** A step that asks a question waits\n for an answer, so \"it never came back\" usually means \"it is waiting on you\".\n `read_run_waiting_on` says what for; `answer_run_question` (or\n `send_run_message` on a conversation run) resumes it. Answer your own test\n runs; on a run a human is depending on, the answer is theirs to give.\n - A FOR EACH launch is not one result. `read_run_items_summary` is the\n roll-up (\"4,415 processed \u00B7 12 failed\") and `list_run_items` the rows \u2014\n with `outcome: \"failed\"`, because the failures are scattered and filtering\n page one finds none of them.\n- A LIST is not the whole list. `list_workflow_runs` returns a page \u2014\n `{ items, nextCursor, pageSize, hasMore }`, 20 by default \u2014 so counting or\n concluding from page one while `hasMore` is true is how you answer confidently\n and wrongly. Follow `nextCursor` until it is null. Two further traps: that\n route lists LAUNCHES (a 4,415-item FOR EACH is ONE entry carrying\n `forEachProgress`, so rows are not runs), and the offset-style lists\n (`list_runs`, `list_publish_approvals`) cap silently \u2014 a full page means\n there may be more, and nothing in the response says so.\n\n## Delete is recoverable \u2014 but not everything is\n- `delete_*` soft-deletes: the entity disappears from `list_*` but is not gone.\n `restore_*` brings it back; `list_deleted_*` shows what's waiting. This\n applies uniformly to workflow, agent, tool, skill, policy, reference_doc,\n persona, output_schema, prompt_snippet, and flow.\n- The same applies one level down, to version HISTORY:\n `delete_*_version` removes one entry from history (the current draft and\n published version are protected and can't be targeted this way);\n `list_deleted_*_versions` / `restore_deleted_*_version` undo it. Deleted\n version numbers stay reserved rather than reused, so gaps in the numbering\n are normal, not a sign of corruption.\n- `restore_*` can itself 409 if a live entity now holds the same name/slot \u2014\n the error names the conflicting one.\n- There is no \"archive\" state for these ten entities \u2014 delete + restore IS the\n lifecycle. Runs are the one exception with a true archive/unarchive (see below).\n\n## Per entity \u2014 what to create, and what \"complete\" means\n\nBuild in dependency order: a thing you will REFERENCE must exist before the\nthing that references it. So: tools and output-schemas first, then agents (which\nlist tool ids), then workflows (whose steps name agents and tools), then\ntriggers (which make a workflow fire). Skills/policies/reference-docs can be\nmade any time before you attach them.\n\n### tool (`create_tool`, strict body)\n- Required: `name`. Also: `description`, `type`, `inputSchema`,\n `outputSchema`, `implementation`, `authConfig`, `surfacing`.\n- `type`: `\"function\"` (default) | `\"connector\"` | `\"validator\"` |\n `\"evaluator\"`. `surfacing`: `\"always\"` (in the agent's tool list) |\n `\"on_demand\"`.\n- `inputSchema` / `outputSchema` are JSON-Schema objects describing the tool's\n params and result. Set them \u2014 an agent binds to a tool by its declared I/O; a\n tool with no inputSchema is hard to call correctly.\n- `implementation` is what makes the tool DO something, and its shape depends on\n `type`:\n - **function** \u2014 carries the Python. Author and check the code with\n `validate_tool_code` and `format_tool_code`, and prove it runs with\n `execute_tool`, BEFORE `create_tool`. A function tool whose\n `implementation` is empty is an inert stub.\n - **connector** \u2014 carries the HTTP call: typically `connectorType`\n (\"rest\"/\"graphql\"), `baseUrl`, `method`, `path`, `headers`,\n `queryParams`, `body`, `responseMapping`, `pagination`. Prefer the\n `create_connector` tool, which sets `type:\"connector\"` for you. NEVER put\n a real credential in `authConfig` \u2014 placeholders only (\"{{ MY_SECRET }}\"\n or \"\"); a human fills the secret in Axonity. Test with\n `execute_stored_connector` (uses the real, server-side-decrypted secret;\n you see only the result).\n - **validator / evaluator** \u2014 a constrained kind, and `implementation` takes\n ONE OF TWO shapes. Either `{\"builtin\": \"validators.<name>\"}`, naming a\n house predicate \u2014 look at the tenant's existing validator/evaluator tools\n (`list_tools`) for the keys in use rather than inventing one. Or authored\n Python, like a function tool, whose `run` returns a VERDICT: `True` /\n `False` / a fail-detail object. A `run` that returns a string, a number\n or nothing at all declares no verdict and is REFUSED on save, so that a\n misconfigured gate cannot silently pass everything at run time. Authored\n code takes the standard call \u2014 see Validators.\n- Complete check: the tool has the I/O schemas its callers need AND a non-empty\n implementation of the right shape for its type.\n- `toolboxId` files the tool in a toolbox on creation. Read `list_toolboxes`\n BEFORE you create: a tool made without one is ungrouped, which is valid and\n is also how nobody finds it. See Toolboxes below.\n\n### agent (`create_agent`, strict body)\n- Required: `name`. Enumerated fields, with their ONLY valid values:\n - `capabilityTier`: `economy` | `standard` (default) | `smart` | `reasoning`\n - `creativityTier`: `low` | `medium` (default) | `high`\n - `learningMode`: `none` (default) | `adaptive` | `strict`\n- `avatar`, `tags` (free labels for grouping \u2014 they gate nothing; see Field\n shape), `canOwnProcess` (bool; must be true for an agent to own a\n workflow step's flow), `episodicMemoryEnabled` (bool).\n- `permissions` (object): `planning`, `delegation`, `verboseOutput` (bools);\n `outputValidators` / `exposedValidatorTools` (snake_case specs \u2014 see Field\n shape for the casing, Validators for what they say);\n `expectedOutputSchemaId` (an output_schema id \u2014 MANDATORY whenever you\n attach validators here).\n- Wiring fields \u2014 see the Wiring section: `toolIds`, `systemToolIds`,\n `delegationTargetIds`.\n- Complete check: an agent with no `toolIds`/`systemToolIds` has no tools and\n can only reason/talk. If it is meant to DO something, give it the tools.\n\n### workflow (`create_workflow`, then edit the document)\n- `create_workflow` makes a STUB (name, description) with an empty document.\n You then build the graph with either\n - `apply_workflow_mutations` \u2014 a LIST of command mutations applied in order\n (preferred: the backend validates each and threads the version), or\n - `replace_workflow_document` \u2014 a full-document atomic PUT.\n- The document is a graph: `steps.all[]` (each `{ id, type, name, ... }`) and\n `steps.edges[]` (each `{ id, from, to, type? }`) plus `triggers`.\n- WHICH VALUES a step's `type` and a trigger's `typeId` may hold is answered\n by `get_workflow_authoring_spec`, read live from this deploy. This guide\n does not list them, on purpose: it used to name nine step types where seven\n validate, and a list nobody could read is a list that goes wrong. The spec\n also lists the types you may NOT author, each with the reason and how to\n express that intention instead \u2014 so reaching for one gets you an answer\n rather than a `step_invalid_type`.\n- Referential integrity is enforced: step and trigger ids must be unique, and\n every edge `from`/`to` must reference an id that exists in the document\n (`from` may be a trigger or step; `to` must be a step). A dangling edge is a\n hard error.\n- Complete check: run `validate_workflow` on the document \u2014 it returns\n `launchable` plus an `issues` list. A workflow is not done until it is\n launchable AND has a trigger (see Triggers).\n\n### persona\n- An agent's character \u2014 1:1 with an agent. Created only through its agent\n (`create_agent_persona`: `name`, `characterText`); then a normal entity\n (`read_persona`, `update_persona`, delete/restore/versions).\n\n### output_schema\n- A reusable output contract, versioned and publishable. Referenced BY id from a\n tool's validators or an agent's `permissions.expectedOutputSchemaId` \u2014 so\n create it first, then point things at the id the create call returns.\n- `schemaBody` is a JSON Schema document (`type`, `properties`,\n `required`) PLUS one key that is not JSON Schema: `validators`, the gates\n run against a submitted output. This is the place a validator can be STEERED\n at part of the output \u2014 see Validators.\n\n### skill / policy / reference_doc\n- Memory entities attached to agents (and skills also to workflows). Create them,\n then wire with the `attach_*` tools \u2014 see Wiring.\n\n### prompt_snippet\n- Reusable prompt fragments; a normal entity. Wire-level oddity:\n `list_deleted_prompt_snippets` returns the backend `items` envelope.\n\n### flow\n- A reusable workflow fragment in the authored-entity lifecycle. `create_flow` /\n `update_flow` write draft state; runtime uses `read_flow_published` until\n approval. `request_publish_flow` to publish, `discard_flow_draft` to reset.\n\n### data_table\n- An authored table of rows: the tenant's own reference data, designed and\n maintained by a person, read by agents and decisions. Same lifecycle as an\n output schema \u2014 draft, version, request publish. See \"Tables\" below, which is\n where the rules that are NOT the generic ones live.\n\n### company\n- The tenant's single company document (mission, value streams, org structure).\n A SINGLETON \u2014 one per tenant, no id, so there is no list/create/delete:\n `read_company`, `update_company` (a WHOLE-document save with\n `expectedVersion`, like `replace_workflow_document`), `list_company_versions`,\n `read_company_version`, `restore_company_version`, `read_company_published`.\n Publish it like anything else with `request_publish_company` \u2014 but because it\n is a singleton this takes NO id (the server resolves your tenant's one\n company). Direct company publish is closed to machine tokens, so the approval\n queue is the only path.\n\n## Validators \u2014 one shape, one call\nA validator is a GATE on a submitted output: it runs after an agent produces a\nresult and can refuse it. Specs are written in two places and carry the same\nkey names in both \u2014 `permissions.outputValidators` on an agent, and\n`validators` inside an output_schema's `schemaBody`. The backend's OpenAPI\ndescription of `schemaBody` is the source for the full contract; what follows\nis the part you cannot author without.\n\n- A spec names its check in ONE of two ways, and each brings its own binding:\n - `function` \u2014 a shipped predicate (e.g. `validators.min_length`), bound\n by `target` (the field it judges; omit it to judge the whole output) and\n `args`.\n - `tool` \u2014 a validator TOOL in this tenant's library, by name or id.\n Exactly one of the two. Naming both leaves it unsaid which one runs, naming\n neither leaves nothing to run, and a gate does not get to be ambiguous \u2014 both\n are refused. The binding keys do not mix either: `target`/`args` belong to\n the `function` form and are refused on a `tool` spec, because a key the\n runtime ignores is worse stored than rejected.\n- `error_message` is what the agent is told on refusal, and the one key both\n forms share. `{value}` in it is replaced by what the validator reported.\n- `when_present` runs the check only when the target field is actually in the\n payload. Off by default, deliberately: a blanket skip turns a mistyped\n `target` into a gate that passes everything. Set it where a field is\n genuinely optional.\n\n### The standard call\nEVERY authored validator is invoked the same way. The signature does not vary\nper tool, and that is the whole point: a screen cannot offer inputs it does not\nknow, and a spec served to an agent cannot describe a shape that differs per\ntool. Bespoke parameters push the contract into prose that goes stale.\n\n```\nrun(data, slots, binding)\n```\n\n- `data` \u2014 what the validator is pointed at, UNTOUCHED. The whole submitted\n output, or the field named by `field`.\n- `slots` \u2014 every declared session-memory reference found in `data`, with its\n text, indexed by the reference itself. The platform resolves them because code\n in the sandbox is never handed a lookup callable \u2014 a validator may be foreign\n code.\n- `binding` \u2014 what you declared, verbatim, so the validator knows which values\n in `data` are references to look up rather than text to read. Without it it\n would have to guess, and guessing is how a check reads a key as though it were\n the body.\n\nTwo keys on the spec steer that call: `field` names the part of the output to\nhand over (leave it out for the whole output), and `slots` lists the fields\nthat hold references.\n\n```json\n{ \"tool\": \"my.freshness.check\",\n \"field\": \"units\",\n \"slots\": [\"key\", \"source_key\"],\n \"error_message\": \"REJECTED: {value}\" }\n```\n\nBOTH ARE CHECKED WHEN YOU SAVE the output schema, and a refusal names the\nfields that do exist: a `field` that is not a property, or a `slots` name the\nrows do not carry. That check is there because either mistake fails SILENTLY at\nrun time \u2014 a name that is not there is never looked up, so the gate runs on\nunresolved values and nothing says so. (Rows whose schema declares no shape are\nleft alone: there is nothing to check against, and guessing would refuse correct\nconfigurations.)\n\nWHERE `field` AND `slots` ARE ACCEPTED: inside an output_schema's\n`schemaBody`, which is stored verbatim. An agent's\n`permissions.outputValidators` is a STRICT body \u2014 an undeclared key is a 422 \u2014\nso a spec written THERE takes neither, and its validator gets the whole output\nand no slots. Steer a validator from the output_schema.\n\n### The older, explicit binding\nA tool spec MAY declare `inputs` instead, and a spec with `inputs` does NOT\nget the standard call. That is the way for a validator tool backed by a shipped\npredicate, which receives `value` plus its own arguments \u2014 its `run` would\nnot accept `data`/`slots`/`binding`. Each entry is\n`{\"source\": \"field\"|\"const\", \"field\": <name>, \"as\": \"slot\"?}`; with\n`as: \"slot\"` the field's value is read as a reference and its TEXT is passed.\n`field` takes a path, so a binding can point INTO a list: `units[].key` is,\nfrom every row in `units`, the `key` field.\n\nWriting a NEW validator: take the standard call and leave `inputs` out.\n\n## Wiring \u2014 how the pieces connect\nThere are THREE mechanisms, and using the wrong one silently no-ops. Know which\neach link uses.\n\n**A) Set a field on the entity (via create/update)** \u2014 an id or id-array that\nlives in the entity body:\n- tool \u2192 agent: add the tool's id to the agent's `toolIds`. This is how an\n agent gets a (non-system) tool. There is no attach_tool_to_agent route.\n- system tool \u2192 agent: add the catalog id to `systemToolIds`. Get ids from\n `list_system_tools`. No grant/revoke tool \u2014 you set the array via\n `update_agent`. `toolIds` and `systemToolIds` are DIFFERENT lists; a\n system-tool id does not go in `toolIds`.\n- agent \u2192 agent (delegation): add the callee agent's id to the caller's\n `delegationTargetIds` (and set `permissions.delegation: true`).\n- output_schema \u2192 agent: `permissions.expectedOutputSchemaId` (a single id).\n- Changing any of these is read-then-write under optimistic locking: read the\n agent, edit the field \u2014 an id-array is a FULL replace, so include the ids you\n are keeping \u2014 then `update_agent` with `expectedVersion`.\n\n**B) Call an attach route (a link, not a field).** `attach_*`/`detach_*` POST/\nDELETE a link and do NOT touch the entity body:\n- skill \u2192 agent: `attach_skill_to_agent`; skill \u2192 workflow:\n `attach_skill_to_workflow`.\n- policy \u2192 agent: `attach_policy_to_agent`.\n- reference_doc \u2192 agent: `attach_reference_to_agent` (agents only \u2014 there is no\n workflow-scoped reference-doc route).\n- VERIFY every one of these with the read-back before `request_publish_*`:\n `list_agent_skills`, `list_agent_policies`, `list_agent_reference_docs`,\n and `list_workflow_skills` for the workflow-scoped variant. This is not\n optional politeness \u2014 because a link lives OUTSIDE the entity body,\n `read_agent` / `read_workflow` will not show it, so the read-back is the\n only way to tell an attach that landed from one that silently did nothing.\n (Mechanism A is different: those ids ARE in the body, so re-reading the agent\n proves them.)\n- The three agent read-backs also take `workflowId`. With it you get the\n COMPOSED runtime view \u2014 what this agent's prompt actually assembles inside\n that workflow, with a `linkSource` per row saying WHY each item is there (an\n explicit link, tenant-wide, or scoped to the workflow). Without it you see the\n agent on its own, which is not what a run assembles.\n\n**C) Reference an id INSIDE the workflow document** (this is how agents and tools\nget \"into\" a workflow \u2014 there is no attach route for it):\n- agent \u2192 workflow: an `agent` step names its agent in the step's\n `contract.owners[]` as `{ \"type\": \"agent\", \"id\": \"<agentId>\" }`.\n- tool \u2192 workflow: on an `agent` step, list tool ids under\n `contract.tools.toolIds[]` (and/or per plan-step `contract.activities[]`\n entries of `{ \"kind\": \"tool\", \"toolId\": \"<id>\" }`). On an `automation` step,\n set `config.automationType: \"tool\"` and `config.toolId`. A `connector` step\n references a connector tool the same way.\n- Every id you place in a document must be a REAL id in THIS tenant. The workflow\n validator flags a step whose owner agent or referenced tool no longer exists \u2014\n `validate_workflow` is how you catch a bad reference before publishing.\n- Prefer `apply_workflow_mutations` (e.g. `add_step`, `update_step`,\n `add_edge`) over hand-building this JSON: the backend fills defaults and\n validates each edit. Read the returned document to see the exact shape it\n produced, then adjust.\n\n### Which way you are asking\n- `list_workflow_components` \u2014 what does THIS workflow depend on. Two hops:\n what the document names, and what each agent then actually receives.\n- `list_workflows_using` / `list_dependent_agents` \u2014 who depends on THIS\n entity. Ask before you edit or delete anything shared.\n- A component's `reach` is how many workflows name it, this one included. Above\n 1, an edit reaches processes you did not open; `duplicate_workflow_component`\n gives this workflow its own copy and leaves the others on the original.\n\n## Prompt elements & placement (Memory V2)\nA prompt snippet is a LIBRARY item \u2014 creating it changes nothing on its own. It\nonly shapes a run once it is PLACED into a flow step's prompt stack. Placement is\nper flow step, in one of two channels, at an order:\n- `read_workflow_prompt_stacks(workflowId)` (or `read_flow_prompt_stacks(flowId)`)\n resolves a workflow/flow to its steps and each step's system/user stacks \u2014 this\n is how you DISCOVER the `flowStepId`s you place against. Start here.\n- `attach_prompt_snippet_to_flow_step(flowStepId, snippetId, target, displayOrder?)`\n \u2014 `target` is `\"system\"` (instructions the model is steered by) or `\"user\"`\n (content presented as the user turn).\n- `list_flow_step_prompts` shows a step's current system/user stacks (with each\n attachment's `linkId`); `update_flow_step_prompt(linkId, \u2026)` moves/reorders one;\n `reorder_flow_step_prompts(flowStepId, snippetIds)` sets the whole order;\n `detach_prompt_snippet_from_flow_step(linkId)` unlinks (the snippet survives).\n- A WILDCARD snippet applies to EVERY step (top of every stack), with no\n per-step link. `list_wildcard_prompts` shows them.\n\nWhich prompt element an instruction goes in \u2014 persona, policy, skill, reference\ndoc or a step's activities \u2014 and how large each may be, is not decided here: the\nplacement rules are served by the platform and appended to this guide, read live\nfrom this deploy each time you call it.\n\nLong-term recall for an agent is the agent's **`episodicMemoryEnabled`** flag\n(Memory V2, opt-in). Session/workflow memory are RUNTIME, not authored: they are\nwritten by a run, never set here. This connector does not expose them \u2014 the\nbackend serves them per run, but no tool wraps those reads yet, so do not\npromise a user you can show them.\n\n## Reproducing a setup (recreate, never copy ids)\nTo rebuild an agent/workflow/tool graph as NEW entities \u2014 in this tenant, or in\nanother tenant by pointing the connector at THAT tenant's token in a separate\nsession \u2014 author it fresh and wire by the NEW ids. An id from a read is\nmeaningful only in the tenant it came from; sending it back in a create/update\nelsewhere points at nothing. Do this instead:\n1. Read the source graph (in the session pointed at it) for its SHAPE: names,\n field values, which tools each agent lists, which agents/tools each workflow\n step references. START WITH `list_workflow_components`: it answers what the\n workflow is made of in one call \u2014 agents and flows, the workflows it calls,\n the tools those agents reach, the tables behind those tools, the knowledge\n attached \u2014 each row naming the STEPS that are the reason it is there. Walking\n that outward by hand is how a rebuild quietly loses a tool nobody noticed was\n attached. Then read each entity for its field values. For each source agent\n also read its LINKS \u2014 `list_agent_skills`, `list_agent_policies`,\n `list_agent_reference_docs` \u2014 they are not in the agent body, so a plain\n `read_agent` misses them and you would rebuild an agent that quietly lost\n its skills and guardrails.\n2. Create the leaf dependencies first (tools, output_schemas). Keep a map from\n each OLD id to the NEW id the create call returns.\n3. Create agents, translating every referenced id through your map:\n old toolId \u2192 new toolId in `toolIds`, etc. Never send an old id. If the\n source agent has a persona, recreate it with `create_agent_persona` on the\n new agent.\n4. Create workflows; when you add agent/tool references into the document,\n translate through the map the same way.\n5. Attach skills/policies/reference-docs by the new ids, then read them back\n (`list_agent_*`) and diff against what you read in step 1.\n6. `validate_workflow` and re-read each entity to confirm every reference\n resolved, then `request_publish_*`.\nThe connector never carries a secret across: `authConfig` stays placeholders in\nthe new tenant too, and a human fills the real value there.\n\n## Structural workflow edits\n- **Start by reading the spec.** `get_workflow_authoring_spec` returns FOUR\n lists this deploy generates from its own registries: the mutation commands,\n the trigger types, the step types (including the ones you may not author, with\n the reason), and the schedule-rule shapes with a working example each. Neither\n this guide nor the tool descriptions restate any of those lists: a list kept\n in the connector is right only by maintenance, and it has been wrong twice\n already, both times in the direction that costs an agent a 422 on something it\n was told to use. Pass `types` for the live payload schema of a command you\n are about to write.\n- **The payload schemas describe themselves.** What may go inside\n `parameters`, `inputs`, `outputs` and `contract` is IN those schemas \u2014\n including the fact that a bound input DERIVES its contract from the output it\n reads. Ask the spec for the command's `types` rather than looking for prose\n about the shape here; there deliberately is none.\n- **One thing the schemas do not make obvious: which KEY carries the value's\n type, because it is not the same key everywhere.**\n - A TRIGGER PARAMETER and a WORKFLOW CONSTANT use `type`.\n - A step INPUT or OUTPUT uses `kind`.\n - Where a field carries a nested `schema` object, `schema.kind` is what\n wins.\n\n This asymmetry is real, not a typo to normalise: the shapes came from\n different surfaces, and normalising them would make one reader wrong. The\n VALUES differ too \u2014 `get_workflow_authoring_spec` returns one list per key\n (`parameterTypes`, `outputKinds`, `schemaFieldKinds`), and they are not\n interchangeable: only one knows `constant`, and they disagree on how to\n spell a yes/no. Read the list that matches the shape you are writing; this\n guide does not restate them, for the same reason it restates no other list.\n\n Writing `kind` on a trigger parameter is not a 422; it is a key nothing\n reads, so the value silently falls back to text and the workflow runs with\n the wrong thing. Check which of the three you are writing before you write it.\n- `rulesVersion` in that response is a content hash over all four lists. While\n it is unchanged there is nothing to re-fetch; re-read the spec when it changes,\n or when a mutation fails with a 422 suggesting your idea of a command is stale.\n- `apply_workflow_mutations` takes a LIST of commands and applies them in order,\n threading the version for you \u2014 pass the version you read, not one per command.\n- It is NOT transactional. If command N fails, the ones before it stay applied;\n the error tells you how many landed and which index failed. Re-read and resume\n from that index rather than replaying the whole list.\n- `replace_workflow_document` stores the document's `name` and\n `description` \u2014 they sync onto the workflow's own columns, an omitted key\n leaves the stored value alone, and an explicit `\"\"` clears it. `stageId`,\n `capabilityId`, `valueStreamId` and `onFailure` are PATCH-only: changing\n one through this route is REFUSED with a 422 naming the field, and\n round-tripping it unchanged passes. Read, edit, write is therefore safe;\n re-linking a workflow to another stage or capability is its own call.\n- The response is a SUMMARY (version, appliedCount, launchable, validationIssues,\n stepCount, edgeCount), not the document. That is deliberate: a real workflow\n document overflows the response limit, and a successful call would come back\n looking like a failure \u2014 retrying that is how you end up with duplicate steps.\n Ask for the document with `returnDocument: true` or `read_workflow`.\n- Command payloads are STRICT and complete:\n - `add_step` builds a whole step in ONE call \u2014 `name` and `position` are\n required, and `id`, `type`, `config`, `contract`, `inputs` and\n `outputs` are accepted next to them. No follow-up `update_step` is needed\n just to fill the step in.\n - `add_trigger` does the same for a trigger: `parameters` and `outputs`\n go in that call. This is what makes a callable workflow declarable in one\n mutation, since a trigger's parameter list IS its signature.\n - `add_edge` takes the document's own `from`/`to` as well as\n `fromStepId`/`toStepId`, and keeps an `id` you supply.\n - An unknown or misspelled key is a 422 naming it, not a silent drop \u2014 so\n spelling matters and you are told when it is wrong.\n\n## Inputs and constants \u2014 the two lists that belong to the PROCESS\nA workflow declares two whole-list things of its own, both edited the same way\n(read the list, change it, write it back \u2014 there is no per-entry command,\nbecause the identity is the `name` and renaming is the common edit):\n- `set_workflow_inputs` \u2014 what the process NEEDS to start. Carried by every\n start, and the list a caller fills in whichever trigger fired. A start's own\n `parameters` are what that start declares on top; where a name is in both,\n the process-level one wins.\n- `set_workflow_constants` \u2014 what the AUTHOR pins, described below.\nRead both back with `read_workflow_trigger_parameters`, which answers\n`{ inputs, triggers, constants }`.\n\n## Constants \u2014 values the AUTHOR owns\nA constant is applied on EVERY run whichever trigger fired, and it OVERWRITES\nwhatever a caller sent. That is deliberate: a field the operator's form does not\nshow must not become an injection point for anyone who learns its name.\n- Set them with the `set_workflow_constants` command. It replaces the WHOLE\n list, the way `advanced_edit` replaces steps and edges \u2014 read the list, edit\n it, write it back. There is no per-constant command, because a constant's\n identity is its name and renaming is the common edit.\n- Every entry needs a `name`: it is what a step binds to and how the run\n payload keys it. A nameless entry is refused rather than stored, because at\n run time it would simply be skipped.\n- **A constant with no value blocks publishing.** `constant_without_value` is\n an error, not a warning, and it names the constant. It has to be: an entry\n with no value was never written into the run at all, so the workflow validated\n clean, published, and ran without it.\n- ABSENCE, not falsiness. `0`, `\"\"`, `false` and `[]` are values and pass.\n- The value lives in `defaultValue`. On a constant that is not a fallback \u2014\n it IS the value, written on every run. A constant carries no `required`\n (nobody is being asked to fill it in) and needs no flag saying it is one.\n- **A trigger parameter can be pinned the same way**, and the platform reads\n TWO spellings: `constant: true`, or the older `type: \"constant\"`. Both\n mean the author owns it and the caller must not send it, so treat a parameter\n carrying either as off-limits when you build `triggerInput`.\n `read_workflow_trigger_parameters` collapses both into `pinned`, on the\n workflow's constants and on each start's parameters \u2014 read that rather than\n checking the two spellings yourself.\n\n## Two platform invariants that look like bugs\nBoth are deliberate, both run after EVERY edit, and both now report themselves in\nthe mutation response under `systemAdjustments` \u2014 so you no longer have to diff\na document to find out what the platform did.\n- **A bound input's contract is derived, not authored.** An input that reads an\n upstream output takes its contract \u2014 description included \u2014 FROM that output.\n Write the text on the producing step's output; a downstream description changing\n when you edit an output is this rule at work, not the platform overwriting you.\n The inputs it re-derived come back in `rederivedInputs`.\n- **Every step reaches the END point.** The platform guarantees it and wires that\n edge itself; the edges it added or removed come back in `addedEdges` /\n `removedEdges`. An edge you did not ask for is this, not corruption.\n\n## Validating: two questions, two calls\n- `validate_workflow({ workflowId })` checks the STORED workflow against the\n tenant catalog \u2014 it confirms the agents, tools and flows the steps reference\n actually exist. This is the \"can this run?\" answer, and it comes back with\n `catalogChecked: true`.\n- `validate_workflow({ document })` is stateless and read-only-token safe, but\n without a catalog it can only judge STRUCTURE: `launchable` there means the\n graph is sound, not that it will run. It says so with `catalogChecked: false`.\n- Pass exactly one. Before telling a human a workflow is ready, check\n `catalogChecked` \u2014 a green structural verdict is the easiest thing to\n over-read.\n- Read the `issues` rather than only `launchable`: the validator now reports\n a sub-process call with no target, one pointing at itself, one whose target\n is deleted or was never published or has no invocation trigger, a constant\n with no value, and a trigger drawn on the canvas that nothing is wired to.\n Some of those are warnings and still let a workflow publish \u2014 read the\n `severity`, and read the `code`, which is stable where the message is not.\n\n## Triggers\n- A published workflow still does nothing until it has a trigger. A trigger has\n TWO halves, and drawing one on the canvas is only the first.\n- **A schedule is reconciled for you.** Draw it in the document, publish, and\n the firing row is brought into line. That is the exception.\n- **A webhook or conditional trigger is NOT.** Its row must be created\n separately \u2014 `create_webhook_trigger` / `create_conditional_trigger` \u2014\n and publishing will not create one. A webhook drawn and published with no row\n is an endpoint that does not exist; the validator says so with\n `trigger_not_wired`, a WARNING, so the publish still goes through. Take the\n warning seriously: nothing else will tell you.\n- Trigger deletes are HARD deletes \u2014 no restore. Webhook tokens are shown once\n at create/rotate and are never retrievable; hand them straight to your human\n and never store one in an entity field.\n- **A schedule is a claim \u2014 check it.** `run_cron_schedule_now` fires one\n immediately without moving `nextFireAt`, so you can prove a schedule starts\n something instead of waiting until tomorrow to find out it does not. It runs\n for real, with real cost and side effects.\n- **To PAUSE a schedule, disarm it** (`set_cron_schedule_enabled`), never\n delete it. Deleting throws away the rules the author wrote and makes \"stop\n this for a week\" indistinguishable from \"we do not do this any more\".\n- `create_cron_schedule` takes EITHER `cronExpr` OR `rules`, and the\n trigger must exist in the PUBLISHED document. For the rule shapes, read\n `scheduleRuleKinds` from `get_workflow_authoring_spec` \u2014 do not invent one.\n- `list_all_cron_schedules` answers \"what runs tonight?\" across the tenant;\n `reconcile_cron_schedules` answers \"is that actually what runs?\". The second\n reports rather than tidying silently and never arms something switched off.\n- **A conditional trigger without a CHECK starts the workflow every beat.** It\n wakes on its interval and, with nothing set, runs regardless of whether there\n was anything to do \u2014 a mailbox on fifteen minutes then makes ninety-six empty\n runs a day. Set `checkKind` on `create_conditional_trigger`, or on an\n existing one with `update_conditional_trigger`; every trigger authored\n before checks existed has none, so read `checkKind` in\n `list_conditional_triggers` before assuming otherwise.\n- `checkKind: \"automatic\"` is ONE tool call and one rule on its answer \u2014 no\n model, so it is the cheap way to ask \"is there anything there?\". Its\n `checkConfig` is `{ toolId, inputs?, rule: { field, op, value } }`, where\n `field` names a key OF THE TOOL'S ANSWER. A rule pointing at a field the\n tool never returns is reported as a broken setup, not as \"condition not met\".\n `\"agent\"` is reserved for a model judging the condition and is refused\n today. Do not pre-validate a check here \u2014 the backend judges it with the same\n function the dispatcher runs when the trigger fires, and its refusal says\n what to change.\n- **To take a check off again, send `checkKind: \"\"`** \u2014 the empty string. It\n clears the kind and its config together and returns the trigger to starting\n every beat. Omitting the field leaves the check standing, which is why the\n empty string exists at all.\n\n## Evaluating what you built\n- There is no findings endpoint and no evaluator entity. To judge a run, read it:\n `read_run` (its `validatorVerdicts` and `agentInvocations`) and\n `read_run_trace` (the step-by-step tool calls).\n- **Start with `read_run_outline`, not `read_run`.** The outline is the run's\n table of contents and carries no bodies, so it costs what the run's SHAPE\n costs rather than its content \u2014 a fan-out over four thousand items reads about\n as cheaply as one over four. Then open only what you need:\n `read_run_value` for one large step value (by the digest in `stepStates`),\n `read_run_invocation_messages` for one agent's transcript (by the id in\n `agentInvocations`). Reading a whole run to find one message is the habit\n this replaces.\n- `itemCap` on the outline bounds items listed per fan-out step; the remainder\n is counted in `counts.truncated`, never dropped in silence.\n- **What an agent wrote to itself is readable.** `list_run_session_memory`\n lists the files an agent left during a run (metadata only) and\n `read_run_session_memory_file` opens one. When the trace shows a decision but\n not what it was reading, this is usually where the reason is. Workflow-bound\n reference material is NOT here \u2014 that lives in `reference_docs`.\n- **`list_todo_steps`** is every step in the tenant waiting on a human, across\n all runs; `read_run_waiting_on` is the same question for one run you already\n have. It is PAGED over the waiting RUNS, so `items` can be longer than\n `pageSize` \u2014 one run may park several steps. Follow `nextCursor` until it\n is null before concluding anything about how much is waiting.\n- Runs are the only thing with a real archive state \u2014 `archive_run` is\n reversible, `bulk_delete_runs` is not.\n\n## Subworkflows \u2014 one workflow calling another\nBoth halves live in the workflow DOCUMENT, so both are ordinary\n`apply_workflow_mutations` work. There is no separate \"link\" route.\n- **To make a workflow callable**, it needs TWO things: a trigger with\n `typeId: \"subprocess-invocation\"` (`add_trigger`), which is what makes it\n callable at all, and a declared SIGNATURE.\n- **The signature belongs to the PROCESS, not to the trigger.** Declare it with\n `set_workflow_inputs` \u2014 one list, carried by every start, and the same list\n a caller of any kind fills in. A trigger's own `parameters` are what THAT\n start declares on top; `parameters` goes in the `add_trigger` call itself,\n so a start that does add fields needs no follow-up `update_trigger`.\n- Older documents declared everything on the invocation trigger instead, and\n that still works: both are read, and where a name appears in both the\n PROCESS-level one wins. When you are editing a workflow you did not author,\n read `read_workflow_trigger_parameters` and see which list actually holds\n its fields before adding to either.\n- `set_workflow_inputs` REPLACES the whole list, like\n `set_workflow_constants`: read, edit, write back. An entry with no `name`\n is refused rather than stored \u2014 the name is how a caller passes the value and\n how the run payload keys it, so a nameless one would be skipped silently at\n run time.\n- For what an input or a parameter may contain, ask\n `get_workflow_authoring_spec` for the payload schema of the command you are\n about to write, rather than a shape written down here.\n- **It must also be PUBLISHED.** The catalogue reads the published document, so\n a draft-only workflow comes back `callable: false` with \"Never published\".\n Authoring the caller first and publishing the callee later is a run-time\n failure waiting to happen.\n- **To call it**, add a step with `type: \"subprocess\"` and\n `config: { targetWorkflowId, ownerAgentId }` \u2014 both required, both workflow/\n agent ids. Bind the step's `inputs` by NAME to the callee's `parameters`;\n that is the whole mapping, there is no separate argument block.\n- `config.waitForCompletion` is **IGNORED** if you write it. Drawing a step\n after this one already means \"after\", so waiting is implied. The one thing the\n graph cannot say is fire-and-forget: `config.fireAndForget: true`, and then\n nothing downstream may depend on the result.\n- `config.errorStrategy` (\"fail\" | \"skip\") is only honoured when the step\n ITERATES (`config.iteration.enabled`). On a single call \"skip\" would report\n a failed child as success, so it is forced to fail-fast.\n- **A workflow cannot call itself** \u2014 every run would spawn a child that reaches\n the same step again. Pass `exclude: <the workflow you are editing>` to\n `list_callable_workflows` and it is kept out of the list.\n- **What comes back** is the callee's `outcomes`: its end steps, each with the\n fields bound into it. WHICH end was reached is itself part of the answer.\n- **`validate_workflow` checks this now.** A missing target, a workflow\n calling itself, a target that is deleted, never published, or has no\n invocation trigger \u2014 each has its own issue code, and the ones that resolve to\n nothing are errors that block publishing. Still run\n `list_callable_workflows` BEFORE you author the step: it is how you pick a\n target and see the interface you are binding to, where the validator only\n tells you afterwards that the one you picked was wrong.\n\n## Secrets\n- Never handle a real credential. A connector's `authConfig` takes placeholders\n only (\"{{ MY_SECRET }}\" or \"\"); a human fills the real value in Axonity. This\n is enforced \u2014 a write carrying something that looks like a real secret is\n rejected before it leaves this connector.\n- You CAN read the catalogue: `list_secrets` (id, name, authType) and\n `read_secret`. That is how you get the id for a connector's\n `authConfig.secretId` \u2014 do not ask a human to copy one out of the UI.\n- Before you wire a connector to a secret, check `valueKeys` on\n `read_secret`. An empty list means nobody has filled the secret in yet: the\n connector will author fine and fail at RUN time. Say so to your human, with the\n secret's name, rather than reporting the wiring as done.\n- You cannot create, change or delete a secret. That is a human act in Axonity \u2192\n Settings \u2192 Secrets, and the backend refuses it from this connector's token.\n- A secret's `metadata` (connection config, e.g. a session_cookie handshake)\n comes back with credential-shaped entries withheld, listed under\n `metadataRedacted`. If you need one of those values, a human reads it in\n Axonity \u2014 do not try another route to it.\n\n## Tables \u2014 the tenant's own reference data\nA table is an authored library element that HOLDS ROWS: the pricing bands, the\nregion-to-owner map, the list of accepted reason codes. A person designs the\ncolumns and maintains the content; agents and decisions read it.\n\n**When a table is the right element.** Reach for one when the CONTENT is the\npoint and it changes without the process changing.\n- Not an `output_schema`: that describes a SHAPE and holds no data. If you\n find yourself putting example values in a schema, you wanted a table.\n- Not a workflow constant: a constant belongs to ONE workflow and is edited in\n its document. A table is shared, and three workflows reading the same rows is\n the case it exists for.\n- Not a function tool with a list inside it: that makes changing a row an act of\n editing code, reviewing it and publishing a tool. A business user maintains a\n table; nobody should need you to change a postcode.\n\n**Static or dynamic \u2014 who owns the rows.**\n- `isDynamic: false` (the default) is reference data the AUTHOR maintains. A\n workflow reads it and cannot change it. `allowedOperations` must be empty:\n a permission nothing honours is refused, not stored.\n- `isDynamic: true` lets a workflow change the rows, limited to\n `allowedOperations` \u2014 any of `add` / `update` / `delete`. READING IS\n NEVER LISTED there: it is what a table is for and is always allowed.\n- You edit rows through `add_data_table_row` / `update_data_table_row` /\n `delete_data_table_row` whatever the table's mode says \u2014 those grants are\n about what a RUN may do, not about authoring.\n\n**Never put rows in `update_data_table`.** `rows` and `columns` are\nwhole-collection fields: sending one row REPLACES the table's content and\ndeletes everything else. The row tools address a single row by a match\n(`matchColumn`/`matchValue`) and cannot touch the rest \u2014 use them. Reach for\n`update_data_table({ fields: { rows } })` only when you genuinely mean to\nreplace the whole content, and never as a way to append.\n\n**The rule that bites hardest: derived tools follow the PUBLISHED table.** A\npublished table mints its own CRUD tools, so granting an agent access to one is\nordinary tool granting \u2014 take a `toolId` from `list_data_table_tools` and put\nit in the agent's `toolIds`. But those tools follow the table's PUBLISHED\nversion. An author who ticked \"may add rows\" and has not published has granted\nnothing, and the tool that would let a run act on it does not exist yet.\n`list_data_table_tools` reports `offered` (what the draft would yield),\n`toolId` (whether a row exists) and `isLive` (whether a run can reach it)\nseparately for exactly this reason. Read all three before concluding a grant\nlanded. Same rule as everywhere else here \u2014 a draft changes nothing until it is\npublished \u2014 and it is the first thing an agent gets wrong about tables.\n\n**Routing a decision on a table.** A decision can branch by looking a value up\nin one column and taking the branch named in another, with\n`builtin: \"evaluators.table_lookup\"`. The behaviour worth knowing, because no\ncatalogue states it: THE CELL'S VALUE IS THE BRANCH'S OUTCOME KEY \u2014 not a new\nfield, and not something you map afterwards. Every value in the result column\nmust be the outcome key of an outgoing branch, or publishing the workflow is\nrefused. The table must be PUBLISHED: a run reads the published snapshot, so a\ntable that is only saved routes nothing. For the argument names it reads, and\nfor every other selectable evaluator, read `decisionEvaluators` from\n`get_workflow_authoring_spec` \u2014 generated from the registry that dispatches\nthem, so it cannot advertise one the platform would not run.\n\n**Column kinds** come from the same place: `tableColumnKinds` in\n`get_workflow_authoring_spec`. It is a FOURTH vocabulary beside the three for\nparameters, outputs and schema fields, with its own spellings \u2014 do not carry a\nvalue across from one of the others, and do not guess. Every column needs a\n`description`: an agent reads it to know what the column is for, and a save\nwithout one is refused.\n\n**`list_data_tables` is PAGED**, alone among the library lists \u2014 a tenant's\nreference data has no ceiling. Page one is not the library. Follow\n`nextCursor` while `hasMore` is true, or better, narrow in the query:\n`name` is exact and unique per workspace, so \"does one called X already\nexist\" is a single call rather than a walk. The page carries `rowCount`, never\nthe rows; the rows come from `read_data_table`.\n\n## Toolboxes \u2014 where a tool is filed\n- A toolbox is a per-tenant grouping label over tools. Read `list_toolboxes`\n before `create_tool` and pass the box's id as `toolboxId`; a tool created\n without one is ungrouped. Move an existing tool with\n `assign_tool_toolbox` (`toolboxId: null` takes it out of its box).\n- `set_toolbox_tools` DECLARES the membership \u2014 it does not add to it. A tool\n in the box and absent from your list is evicted. To add one tool, read the\n box's contents first, or use `assign_tool_toolbox`, which cannot evict\n anything by accident. A tool is in at most one box.\n- A toolbox NEVER changes what an agent may call. An agent is linked to\n individual tools (`agent.toolIds`), never to a box; there is no route that\n grants a whole box, and \"give this agent the Carerix toolbox\" is a bulk write\n of individual links. What the box decides is how a tool is ADVERTISED: a boxed\n tool with `surfacing: \"inherit\"` is found via discover_tools instead of\n riding in every prompt. Read `effectiveSurfacing` on the tool to answer \"is\n it in the prompt?\"; `surfacing` is the raw stored choice.\n- Deleting a toolbox does NOT delete its tools \u2014 they survive, ungrouped. The\n box itself has no restore.\n- Platform-shipped tools cannot be moved. The `Axonity`, `Checks` and\n `Branching` boxes hold locked tools; the API refuses and NAMES the tool it\n refused. Read that name to your human instead of bisecting the selection.\n- `set_toolbox_auth` sets the credential a box's tools SHARE \u2014 ten Microsoft\n Mail tools, one mailbox, said once. A tool with its own auth keeps it; only a\n tool with none inherits. Same rule as anywhere else: point `secretId` at a\n stored secret, never a real value. Before you clear or replace it, or delete\n the box, call `list_toolbox_dependent_tools` \u2014 it names the tools that would\n start failing at run time with a bare 401.\n\n## Tenant\n- Your token fixes the tenant. You cannot act across tenants; never send a\n tenant id in a body.\n- `read_model_tier_map` says what `capabilityTier` actually RESOLVES TO on\n this tenant. The tier is the field you write; the model is what you are\n choosing. Read it before you pick one.\n- When a run does not start, look outward before blaming the workflow:\n `read_concurrency_status` (is the tenant at its cap?),\n `read_queue_overview` (is dispatch alive?), `list_task_queue` (did\n something fail in the layer beneath the run?). `read_for_each_rate` explains\n a fan-out that is pacing itself rather than stalling.\n- You can READ those and not change them. Caps, rate ceilings and the tier map\n are operator decisions \u2014 report what you found, and to whom, rather than\n looking for another route to it.\n- `read_deploy_contract` says what THIS deploy speaks: build, environment and\n the routes it mounts. Read it when a call fails in a way that suggests the\n backend is older or newer than you expect.\n- `list_users` is where an `ownerId` comes from. Look one up instead of\n asking a human to copy it out of the UI.\n- `list_audit_events({ actorKind: \"service_token\" })` reads back what external\n agents \u2014 including you \u2014 actually changed.\n";
51
+ export declare const CONVENTIONS = "# Authoring conventions for Axonity entities\n\nRead this before creating or updating anything.\n\n## What this connector is for\n- AUTHORING: composing an entity from intent \u2014 drafting a tool, an agent, a\n workflow, and wiring them together so the result is CORRECT and COMPLETE\n (every required field set, every reference pointing at something real).\n- REPRODUCING a setup is just authoring it again, from scratch. To recreate an\n agent/workflow/tool, CREATE NEW entities and wire them by their NEW ids \u2014\n never reuse an id you read. There is no \"migration\" and no \"import an id\":\n this connector only ever acts in the ONE tenant its token points at (see\n Tenant), and ids are tenant-local, so an id from anywhere else points at\n nothing (or the wrong thing) here. Read the source for its SHAPE and intent \u2014\n names, field values, which tools an agent uses, which agents a workflow's\n steps run \u2014 then build fresh and capture the ids the create calls return.\n Recreating into a DIFFERENT tenant means running that build while the\n connector is configured with THAT tenant's token \u2014 a separate session. See\n \"Reproducing a setup\" below.\n\n## The authoring loop\n1. `read_*` the entity (and `read_*_published` if you need to see what is live).\n2. Edit the DRAFT: `update_*`, or workflow-edit tools for workflow structure.\n3. Validate before publish: `validate_workflow` / `analyze_workflow_reachable_outputs` / \n `validate_tool_code` / `format_tool_code`. These four are stateless and work with\n read-only tokens.\n4. Re-read and verify with a saved tool command: `execute_tool` /\n `execute_stored_connector`.\n5. Fix any issues and re-read again.\n6. For a code tool, PROVE it: `dry_run_tool` \u2014 see \"Proving a tool\" below. Skip\n this and `request_publish_tool` will sit blocked forever.\n7. `request_publish_*` \u2014 this only QUEUES a human approval. Publishing many\n entities at once (taking a tenant live) is `request_publish_bulk`, up to 200\n in one call; it is not transactional, so read the per-entry results.\n8. `list_publish_approvals` / `get_publish_approval` to see whether it was\n approved or rejected. Readiness there is recomputed as you read it\n (`readiness` now, `readinessAtRequest` then, `readinessChanged` if it\n moved), so a blocker you saw earlier may already be gone.\n\n9. If something went wrong:\n - Bad edit, entity still exists \u2192 `list_*_versions` then `restore_*_version`\n to roll the draft back to an earlier version.\n - Never published, want a clean slate \u2192 `discard_*_draft` resets the draft to\n the last published state (fails if it was never published \u2014 there's nothing\n to fall back to).\n - Deleted by mistake \u2192 `restore_*` (see \"Delete is recoverable\" below).\n\n## Proving a tool (the publish gate)\nBefore a code tool may be published, the platform requires that its stored code\nhas run cleanly once, at its current version.\n- `dry_run_tool(toolId)` is the run that counts. It executes the tool's OWN\n saved implementation; you supply only sample input. A clean pass clears the\n `dry_run_required` blocker.\n- `execute_tool` does NOT count, however green it comes back. It runs the\n functions YOU pass, which need not be what is stored \u2014 proving nothing about\n what would ship. Use it while drafting code you have not saved yet.\n- Editing the tool afterwards bumps its version and invalidates the proof, so\n dry-run AFTER your last edit.\n- Connectors, builtin-backed validators and platform-shipped tools have no code\n of their own to prove and will refuse (422/403). That is expected, not a\n failure to work around.\n\n## Drafts, not live\n- `create_*` and `update_*` produce a DRAFT. The live runtime is unaffected\n until a human publishes it in Axonity. `flow` has the same rule: runtime uses\n the published snapshot from `read_flow_published` until `request_publish_flow`\n is approved.\n- You cannot publish directly \u2014 the backend refuses a direct publish from a service\n token with a 403, so there is no tool for it and no way around it.\n- A read-only token can only read: any write returns 403. If you see that, ask\n your human for a write-scoped token rather than retrying.\n- `request_publish_*` does NOT publish \u2014 it creates a pending approval a human\n approves in Axonity. Use it when a draft is ready; then tell the user to\n approve it in their Axonity approvals inbox.\n\n## Optimistic locking (always read-then-write)\n- Before `update_*`, call `read_*` and use the `version` you get as\n `expectedVersion` \u2014 in the request BODY. If the update returns a 409\n conflict, someone else changed it \u2014 read again and re-apply your change onto\n the new version.\n- `delete_*` also takes `expectedVersion`, but as an argument on the tool call\n only \u2014 the connector maps it to whatever query-parameter spelling that\n entity's route actually expects (it differs per entity on the wire; you never\n need to know which).\n- `restore_*` and `restore_deleted_*_version` take NO version at all \u2014 a\n restore must never lose to a stale-version guard.\n\n## Errors: branch on the failure, not the words\n- Every error names what went wrong as plainly as the backend allows. For a 409\n specifically, two different problems share that status code and need\n different responses:\n - **Version conflict** \u2014 you had a stale read. Re-read, re-apply, retry.\n - **Reference conflict** \u2014 the entity is referenced by something published or\n live. Retrying will never help. Detach the reference or unpublish the\n referencing entity first.\n The error message tells you which one you hit \u2014 read it, don't assume 409\n always means \"retry.\"\n- A 403 on any write means the token is read-only, or (for a direct publish\n attempt, which no tool makes) that publishing must go through\n `request_publish_*`. Either way: stop, don't retry, tell your human.\n- A 401 means the service token is dead \u2014 missing, wrong, expired, or revoked.\n **The backend deliberately returns the identical message for all four\n causes** so it doesn't leak which applies; you have no way to tell them\n apart and no way to check a token's remaining lifetime in advance (every\n token now expires \u2014 7, 15, 30, 60 or 90 days, chosen when it was minted;\n there is no \"never\"). On any 401: stop, do not retry, and tell your human\n plainly that the configured token is no longer valid and a new one must be\n minted from Axonity \u2192 Settings \u2192 API tokens. Do not guess or imply the cause.\n\n## Field shape\n- All fields are camelCase JSON (e.g. `capabilityTier`, not `capability_tier`).\n ONE documented exception: validator specs (`permissions.outputValidators`,\n `permissions.exposedValidatorTools`) use snake_case keys (`function`,\n `target`, `args`, `when_present`, `inputs`, `error_message`,\n `tool_name`, `validator_name`) \u2014 they are the same shape at every level and\n are stored verbatim, so they are NOT camel-aliased. Send them in snake_case.\n What those keys MEAN, and how a validator is bound to what it judges, is the\n Validators section.\n- `update_*` is a partial change for agents/tools and a partial patch for\n workflows: send only the fields you are changing (plus `expectedVersion`).\n- The backend validates fields; a 422 error names the offending field and why\n (e.g. `body.capabilityTier: Input should be 'economy', 'standard', 'smart' or\n 'reasoning'`). Fix that field and retry \u2014 do not guess at the whole shape.\n- **create/update for tool and agent are STRICT** (`extra=\"forbid\"`): an\n undeclared OR MISSPELLED key is a 422 that names it, not a silent drop. So\n spelling matters and you get told when it is wrong \u2014 good. Other entities are\n more lenient and may drop an unknown key silently; never rely on that.\n- `agent.tags` is a free label for grouping and reporting. It GATES NOTHING \u2014\n what reaches an agent's prompt is a LINK (`attach_policy_to_agent`), visible\n in a table a human can read and edit. A role-tag gate on a policy used to\n decide that invisibly and is refused outright now: sending\n `activation.tags` to `create_policy`/`update_policy` is a 422. The two\n surviving gates, `activation.tools` and `activation.delegation`, each say\n something a link cannot \u2014 \"only on turns where this agent holds this tool\",\n and \"only when (not) delegated\".\n\n## After you write, verify\n- A 200 means the request was accepted, NOT that it did what you meant. Re-read\n the entity after a mutation and diff it against your intent \u2014 a partial update\n only changes what you sent, and on the lenient (non-tool/agent) entities an\n unknown key can be dropped silently rather than rejected.\n- Re-reading the ENTITY is not enough for an `attach_*`: those links are stored\n outside the entity body and never appear in `read_agent`. Read them back with\n `list_agent_skills` / `list_agent_policies` / `list_agent_reference_docs`\n (see Wiring, mechanism B).\n- \"Complete\" is your job, not the backend's. A create succeeds with only the\n required fields set; it does not tell you the entity is USABLE. An agent with\n no `toolIds` runs with no tools; a connector tool with an empty\n `implementation` has no endpoint to call; a workflow with steps but no\n trigger never fires. After creating, check the entity has everything its\n purpose needs \u2014 see the per-entity and wiring sections.\n- To test a whole workflow end to end, `start_workflow_run` then read the result\n (`read_run` / `read_run_trace` / `read_run_cost`). Note it runs the PUBLISHED\n workflow and really executes (cost, connector side effects), so publish first,\n and only test-run when a human is expecting it.\n - Read `read_workflow_trigger_parameters` first and pass `triggerId`: a\n workflow can have several starts, each with different fields, and omitting\n it fires whichever comes first. Never send a parameter marked `pinned` \u2014\n the author owns that value and it is overwritten anyway.\n - **A run can park instead of finishing.** A step that asks a question waits\n for an answer, so \"it never came back\" usually means \"it is waiting on you\".\n `read_run_waiting_on` says what for; `answer_run_question` (or\n `send_run_message` on a conversation run) resumes it. Answer your own test\n runs; on a run a human is depending on, the answer is theirs to give.\n - A FOR EACH launch is not one result. `read_run_items_summary` is the\n roll-up (\"4,415 processed \u00B7 12 failed\") and `list_run_items` the rows \u2014\n with `outcome: \"failed\"`, because the failures are scattered and filtering\n page one finds none of them.\n- A LIST is not the whole list. `list_workflow_runs` returns a page \u2014\n `{ items, nextCursor, pageSize, hasMore }`, 20 by default \u2014 so counting or\n concluding from page one while `hasMore` is true is how you answer confidently\n and wrongly. Follow `nextCursor` until it is null. Two further traps: that\n route lists LAUNCHES (a 4,415-item FOR EACH is ONE entry carrying\n `forEachProgress`, so rows are not runs), and the offset-style lists\n (`list_runs`, `list_publish_approvals`) cap silently \u2014 a full page means\n there may be more, and nothing in the response says so.\n\n## Delete is recoverable \u2014 but not everything is\n- `delete_*` soft-deletes: the entity disappears from `list_*` but is not gone.\n `restore_*` brings it back; `list_deleted_*` shows what's waiting. This\n applies uniformly to workflow, agent, tool, skill, policy, reference_doc,\n persona, output_schema, prompt_snippet, and flow.\n- The same applies one level down, to version HISTORY:\n `delete_*_version` removes one entry from history (the current draft and\n published version are protected and can't be targeted this way);\n `list_deleted_*_versions` / `restore_deleted_*_version` undo it. Deleted\n version numbers stay reserved rather than reused, so gaps in the numbering\n are normal, not a sign of corruption.\n- `restore_*` can itself 409 if a live entity now holds the same name/slot \u2014\n the error names the conflicting one.\n- There is no \"archive\" state for these ten entities \u2014 delete + restore IS the\n lifecycle. Runs are the one exception with a true archive/unarchive (see below).\n\n## Per entity \u2014 what to create, and what \"complete\" means\n\nBuild in dependency order: a thing you will REFERENCE must exist before the\nthing that references it. So: tools and output-schemas first, then agents (which\nlist tool ids), then workflows (whose steps name agents and tools), then\ntriggers (which make a workflow fire). Skills/policies/reference-docs can be\nmade any time before you attach them.\n\n### tool (`create_tool`, strict body)\n- Required: `name`. Also: `description`, `type`, `inputSchema`,\n `outputSchema`, `implementation`, `authConfig`, `surfacing`.\n- `type`: `\"function\"` (default) | `\"connector\"` | `\"validator\"` |\n `\"evaluator\"`. `surfacing`: `\"always\"` (in the agent's tool list) |\n `\"on_demand\"`.\n- `inputSchema` / `outputSchema` are JSON-Schema objects describing the tool's\n params and result. Set them \u2014 an agent binds to a tool by its declared I/O; a\n tool with no inputSchema is hard to call correctly.\n- `implementation` is what makes the tool DO something, and its shape depends on\n `type`:\n - **function** \u2014 carries the Python. Author and check the code with\n `validate_tool_code` and `format_tool_code`, and prove it runs with\n `execute_tool`, BEFORE `create_tool`. A function tool whose\n `implementation` is empty is an inert stub.\n - **connector** \u2014 carries the HTTP call: typically `connectorType`\n (\"rest\"/\"graphql\"), `baseUrl`, `method`, `path`, `headers`,\n `queryParams`, `body`, `responseMapping`, `pagination`. Prefer the\n `create_connector` tool, which sets `type:\"connector\"` for you. NEVER put\n a real credential in `authConfig` \u2014 placeholders only (\"{{ MY_SECRET }}\"\n or \"\"); a human fills the secret in Axonity. Test with\n `execute_stored_connector` (uses the real, server-side-decrypted secret;\n you see only the result).\n - **validator / evaluator** \u2014 a constrained kind, and `implementation` takes\n ONE OF TWO shapes. Either `{\"builtin\": \"validators.<name>\"}`, naming a\n house predicate \u2014 look at the tenant's existing validator/evaluator tools\n (`list_tools`) for the keys in use rather than inventing one. Or authored\n Python, like a function tool, whose `run` returns a VERDICT: `True` /\n `False` / a fail-detail object. A `run` that returns a string, a number\n or nothing at all declares no verdict and is REFUSED on save, so that a\n misconfigured gate cannot silently pass everything at run time. Authored\n code takes the standard call \u2014 see Validators.\n- Complete check: the tool has the I/O schemas its callers need AND a non-empty\n implementation of the right shape for its type.\n- `toolboxId` files the tool in a toolbox on creation. Read `list_toolboxes`\n BEFORE you create: a tool made without one is ungrouped, which is valid and\n is also how nobody finds it. See Toolboxes below.\n\n### agent (`create_agent`, strict body)\n- Required: `name`. Enumerated fields, with their ONLY valid values:\n - `capabilityTier`: `economy` | `standard` (default) | `smart` | `reasoning`\n - `creativityTier`: `low` | `medium` (default) | `high`\n - `learningMode`: `none` (default) | `adaptive` | `strict`\n- `avatar`, `tags` (free labels for grouping \u2014 they gate nothing; see Field\n shape), `canOwnProcess` (bool; must be true for an agent to own a\n workflow step's flow), `episodicMemoryEnabled` (bool).\n- `permissions` (object): `planning`, `delegation`, `verboseOutput` (bools);\n `outputValidators` / `exposedValidatorTools` (snake_case specs \u2014 see Field\n shape for the casing, Validators for what they say);\n `expectedOutputSchemaId` (an output_schema id \u2014 MANDATORY whenever you\n attach validators here).\n- Wiring fields \u2014 see the Wiring section: `toolIds`, `systemToolIds`,\n `delegationTargetIds`.\n- Complete check: an agent with no `toolIds`/`systemToolIds` has no tools and\n can only reason/talk. If it is meant to DO something, give it the tools.\n\n### workflow (`create_workflow`, then edit the document)\n- `create_workflow` makes a STUB (name, description) with an empty document.\n You then build the graph with either\n - `apply_workflow_mutations` \u2014 a LIST of command mutations applied in order\n (preferred: the backend validates each and threads the version), or\n - `replace_workflow_document` \u2014 a full-document atomic PUT.\n- The document is a graph: `steps.all[]` (each `{ id, type, name, ... }`) and\n `steps.edges[]` (each `{ id, from, to, type? }`) plus `triggers`.\n- WHICH VALUES a step's `type` and a trigger's `typeId` may hold is answered\n by `get_workflow_authoring_spec`, read live from this deploy. This guide\n does not list them, on purpose: it used to name nine step types where seven\n validate, and a list nobody could read is a list that goes wrong. The spec\n also lists the types you may NOT author, each with the reason and how to\n express that intention instead \u2014 so reaching for one gets you an answer\n rather than a `step_invalid_type`.\n- Referential integrity is enforced: step and trigger ids must be unique, and\n every edge `from`/`to` must reference an id that exists in the document\n (`from` may be a trigger or step; `to` must be a step). A dangling edge is a\n hard error.\n- Complete check: run `validate_workflow` on the document \u2014 it returns\n `launchable` plus an `issues` list. A workflow is not done until it is\n launchable AND has a trigger (see Triggers).\n\n### persona\n- An agent's character \u2014 1:1 with an agent. Created only through its agent\n (`create_agent_persona`: `name`, `characterText`); then a normal entity\n (`read_persona`, `update_persona`, delete/restore/versions).\n\n### output_schema\n- A reusable output contract, versioned and publishable. Referenced BY id from a\n tool's validators or an agent's `permissions.expectedOutputSchemaId` \u2014 so\n create it first, then point things at the id the create call returns.\n- `schemaBody` is a JSON Schema document (`type`, `properties`,\n `required`) PLUS one key that is not JSON Schema: `validators`, the gates\n run against a submitted output. This is the place a validator can be STEERED\n at part of the output \u2014 see Validators.\n\n### skill / policy / reference_doc\n- Memory entities attached to agents (and skills also to workflows). Create them,\n then wire with the `attach_*` tools \u2014 see Wiring.\n- Building the SEMANTIC LAYER \u2014 reference docs that say what a table means, what\n a word means, which query fills which table (`semanticKind` and the fields\n that go with it)? Read `axonity_semantic_conventions` first. Those rules are\n served by the platform; this guide does not restate them.\n\n### prompt_snippet\n- Reusable prompt fragments; a normal entity. Wire-level oddity:\n `list_deleted_prompt_snippets` returns the backend `items` envelope.\n\n### flow\n- A reusable workflow fragment in the authored-entity lifecycle. `create_flow` /\n `update_flow` write draft state; runtime uses `read_flow_published` until\n approval. `request_publish_flow` to publish, `discard_flow_draft` to reset.\n\n### data_table\n- An authored table of rows: the tenant's own reference data, designed and\n maintained by a person, read by agents and decisions. Same lifecycle as an\n output schema \u2014 draft, version, request publish. See \"Tables\" below, which is\n where the rules that are NOT the generic ones live.\n\n### company\n- The tenant's single company document (mission, value streams, org structure).\n A SINGLETON \u2014 one per tenant, no id, so there is no list/create/delete:\n `read_company`, `update_company` (a WHOLE-document save with\n `expectedVersion`, like `replace_workflow_document`), `list_company_versions`,\n `read_company_version`, `restore_company_version`, `read_company_published`.\n Publish it like anything else with `request_publish_company` \u2014 but because it\n is a singleton this takes NO id (the server resolves your tenant's one\n company). Direct company publish is closed to machine tokens, so the approval\n queue is the only path.\n\n## Validators \u2014 one shape, one call\nA validator is a GATE on a submitted output: it runs after an agent produces a\nresult and can refuse it. Specs are written in two places and carry the same\nkey names in both \u2014 `permissions.outputValidators` on an agent, and\n`validators` inside an output_schema's `schemaBody`. The backend's OpenAPI\ndescription of `schemaBody` is the source for the full contract; what follows\nis the part you cannot author without.\n\n- A spec names its check in ONE of two ways, and each brings its own binding:\n - `function` \u2014 a shipped predicate (e.g. `validators.min_length`), bound\n by `target` (the field it judges; omit it to judge the whole output) and\n `args`.\n - `tool` \u2014 a validator TOOL in this tenant's library, by name or id.\n Exactly one of the two. Naming both leaves it unsaid which one runs, naming\n neither leaves nothing to run, and a gate does not get to be ambiguous \u2014 both\n are refused. The binding keys do not mix either: `target`/`args` belong to\n the `function` form and are refused on a `tool` spec, because a key the\n runtime ignores is worse stored than rejected.\n- `error_message` is what the agent is told on refusal, and the one key both\n forms share. `{value}` in it is replaced by what the validator reported.\n- `when_present` runs the check only when the target field is actually in the\n payload. Off by default, deliberately: a blanket skip turns a mistyped\n `target` into a gate that passes everything. Set it where a field is\n genuinely optional.\n\n### The standard call\nEVERY authored validator is invoked the same way. The signature does not vary\nper tool, and that is the whole point: a screen cannot offer inputs it does not\nknow, and a spec served to an agent cannot describe a shape that differs per\ntool. Bespoke parameters push the contract into prose that goes stale.\n\n```\nrun(data, slots, binding)\n```\n\n- `data` \u2014 what the validator is pointed at, UNTOUCHED. The whole submitted\n output, or the field named by `field`.\n- `slots` \u2014 every declared session-memory reference found in `data`, with its\n text, indexed by the reference itself. The platform resolves them because code\n in the sandbox is never handed a lookup callable \u2014 a validator may be foreign\n code.\n- `binding` \u2014 what you declared, verbatim, so the validator knows which values\n in `data` are references to look up rather than text to read. Without it it\n would have to guess, and guessing is how a check reads a key as though it were\n the body.\n\nTwo keys on the spec steer that call: `field` names the part of the output to\nhand over (leave it out for the whole output), and `slots` lists the fields\nthat hold references.\n\n```json\n{ \"tool\": \"my.freshness.check\",\n \"field\": \"units\",\n \"slots\": [\"key\", \"source_key\"],\n \"error_message\": \"REJECTED: {value}\" }\n```\n\nBOTH ARE CHECKED WHEN YOU SAVE the output schema, and a refusal names the\nfields that do exist: a `field` that is not a property, or a `slots` name the\nrows do not carry. That check is there because either mistake fails SILENTLY at\nrun time \u2014 a name that is not there is never looked up, so the gate runs on\nunresolved values and nothing says so. (Rows whose schema declares no shape are\nleft alone: there is nothing to check against, and guessing would refuse correct\nconfigurations.)\n\nWHERE `field` AND `slots` ARE ACCEPTED: inside an output_schema's\n`schemaBody`, which is stored verbatim. An agent's\n`permissions.outputValidators` is a STRICT body \u2014 an undeclared key is a 422 \u2014\nso a spec written THERE takes neither, and its validator gets the whole output\nand no slots. Steer a validator from the output_schema.\n\n### The older, explicit binding\nA tool spec MAY declare `inputs` instead, and a spec with `inputs` does NOT\nget the standard call. That is the way for a validator tool backed by a shipped\npredicate, which receives `value` plus its own arguments \u2014 its `run` would\nnot accept `data`/`slots`/`binding`. Each entry is\n`{\"source\": \"field\"|\"const\", \"field\": <name>, \"as\": \"slot\"?}`; with\n`as: \"slot\"` the field's value is read as a reference and its TEXT is passed.\n`field` takes a path, so a binding can point INTO a list: `units[].key` is,\nfrom every row in `units`, the `key` field.\n\nWriting a NEW validator: take the standard call and leave `inputs` out.\n\n## Wiring \u2014 how the pieces connect\nThere are THREE mechanisms, and using the wrong one silently no-ops. Know which\neach link uses.\n\n**A) Set a field on the entity (via create/update)** \u2014 an id or id-array that\nlives in the entity body:\n- tool \u2192 agent: add the tool's id to the agent's `toolIds`. This is how an\n agent gets a (non-system) tool. There is no attach_tool_to_agent route.\n- system tool \u2192 agent: add the catalog id to `systemToolIds`. Get ids from\n `list_system_tools`. No grant/revoke tool \u2014 you set the array via\n `update_agent`. `toolIds` and `systemToolIds` are DIFFERENT lists; a\n system-tool id does not go in `toolIds`.\n- agent \u2192 agent (delegation): add the callee agent's id to the caller's\n `delegationTargetIds` (and set `permissions.delegation: true`).\n- output_schema \u2192 agent: `permissions.expectedOutputSchemaId` (a single id).\n- Changing any of these is read-then-write under optimistic locking: read the\n agent, edit the field \u2014 an id-array is a FULL replace, so include the ids you\n are keeping \u2014 then `update_agent` with `expectedVersion`.\n\n**B) Call an attach route (a link, not a field).** `attach_*`/`detach_*` POST/\nDELETE a link and do NOT touch the entity body:\n- skill \u2192 agent: `attach_skill_to_agent`; skill \u2192 workflow:\n `attach_skill_to_workflow`.\n- policy \u2192 agent: `attach_policy_to_agent`.\n- reference_doc \u2192 agent: `attach_reference_to_agent` (agents only \u2014 there is no\n workflow-scoped reference-doc route).\n- VERIFY every one of these with the read-back before `request_publish_*`:\n `list_agent_skills`, `list_agent_policies`, `list_agent_reference_docs`,\n and `list_workflow_skills` for the workflow-scoped variant. This is not\n optional politeness \u2014 because a link lives OUTSIDE the entity body,\n `read_agent` / `read_workflow` will not show it, so the read-back is the\n only way to tell an attach that landed from one that silently did nothing.\n (Mechanism A is different: those ids ARE in the body, so re-reading the agent\n proves them.)\n- The three agent read-backs also take `workflowId`. With it you get the\n COMPOSED runtime view \u2014 what this agent's prompt actually assembles inside\n that workflow, with a `linkSource` per row saying WHY each item is there (an\n explicit link, tenant-wide, or scoped to the workflow). Without it you see the\n agent on its own, which is not what a run assembles.\n\n**C) Reference an id INSIDE the workflow document** (this is how agents and tools\nget \"into\" a workflow \u2014 there is no attach route for it):\n- agent \u2192 workflow: an `agent` step names its agent in the step's\n `contract.owners[]` as `{ \"type\": \"agent\", \"id\": \"<agentId>\" }`.\n- tool \u2192 workflow: on an `agent` step, list tool ids under\n `contract.tools.toolIds[]` (and/or per plan-step `contract.activities[]`\n entries of `{ \"kind\": \"tool\", \"toolId\": \"<id>\" }`). On an `automation` step,\n set `config.automationType: \"tool\"` and `config.toolId`. A `connector` step\n references a connector tool the same way.\n- Every id you place in a document must be a REAL id in THIS tenant. The workflow\n validator flags a step whose owner agent or referenced tool no longer exists \u2014\n `validate_workflow` is how you catch a bad reference before publishing.\n- Prefer `apply_workflow_mutations` (e.g. `add_step`, `update_step`,\n `add_edge`) over hand-building this JSON: the backend fills defaults and\n validates each edit. Read the returned document to see the exact shape it\n produced, then adjust.\n\n### Which way you are asking\n- `list_workflow_components` \u2014 what does THIS workflow depend on. Two hops:\n what the document names, and what each agent then actually receives.\n- `list_workflows_using` / `list_dependent_agents` \u2014 who depends on THIS\n entity. Ask before you edit or delete anything shared.\n- A component's `reach` is how many workflows name it, this one included. Above\n 1, an edit reaches processes you did not open; `duplicate_workflow_component`\n gives this workflow its own copy and leaves the others on the original.\n\n## Prompt elements & placement (Memory V2)\nA prompt snippet is a LIBRARY item \u2014 creating it changes nothing on its own. It\nonly shapes a run once it is PLACED into a flow step's prompt stack. Placement is\nper flow step, in one of two channels, at an order:\n- `read_workflow_prompt_stacks(workflowId)` (or `read_flow_prompt_stacks(flowId)`)\n resolves a workflow/flow to its steps and each step's system/user stacks \u2014 this\n is how you DISCOVER the `flowStepId`s you place against. Start here.\n- `attach_prompt_snippet_to_flow_step(flowStepId, snippetId, target, displayOrder?)`\n \u2014 `target` is `\"system\"` (instructions the model is steered by) or `\"user\"`\n (content presented as the user turn).\n- `list_flow_step_prompts` shows a step's current system/user stacks (with each\n attachment's `linkId`); `update_flow_step_prompt(linkId, \u2026)` moves/reorders one;\n `reorder_flow_step_prompts(flowStepId, snippetIds)` sets the whole order;\n `detach_prompt_snippet_from_flow_step(linkId)` unlinks (the snippet survives).\n- A WILDCARD snippet applies to EVERY step (top of every stack), with no\n per-step link. `list_wildcard_prompts` shows them.\n\nWhich prompt element an instruction goes in \u2014 persona, policy, skill, reference\ndoc or a step's activities \u2014 and how large each may be, is not decided here: the\nplacement rules are served by the platform and appended to this guide, read live\nfrom this deploy each time you call it.\n\nLong-term recall for an agent is the agent's **`episodicMemoryEnabled`** flag\n(Memory V2, opt-in). Session/workflow memory are RUNTIME, not authored: they are\nwritten by a run, never set here. This connector does not expose them \u2014 the\nbackend serves them per run, but no tool wraps those reads yet, so do not\npromise a user you can show them.\n\n## Reproducing a setup (recreate, never copy ids)\nTo rebuild an agent/workflow/tool graph as NEW entities \u2014 in this tenant, or in\nanother tenant by pointing the connector at THAT tenant's token in a separate\nsession \u2014 author it fresh and wire by the NEW ids. An id from a read is\nmeaningful only in the tenant it came from; sending it back in a create/update\nelsewhere points at nothing. Do this instead:\n1. Read the source graph (in the session pointed at it) for its SHAPE: names,\n field values, which tools each agent lists, which agents/tools each workflow\n step references. START WITH `list_workflow_components`: it answers what the\n workflow is made of in one call \u2014 agents and flows, the workflows it calls,\n the tools those agents reach, the tables behind those tools, the knowledge\n attached \u2014 each row naming the STEPS that are the reason it is there. Walking\n that outward by hand is how a rebuild quietly loses a tool nobody noticed was\n attached. Then read each entity for its field values. For each source agent\n also read its LINKS \u2014 `list_agent_skills`, `list_agent_policies`,\n `list_agent_reference_docs` \u2014 they are not in the agent body, so a plain\n `read_agent` misses them and you would rebuild an agent that quietly lost\n its skills and guardrails.\n2. Create the leaf dependencies first (tools, output_schemas). Keep a map from\n each OLD id to the NEW id the create call returns.\n3. Create agents, translating every referenced id through your map:\n old toolId \u2192 new toolId in `toolIds`, etc. Never send an old id. If the\n source agent has a persona, recreate it with `create_agent_persona` on the\n new agent.\n4. Create workflows; when you add agent/tool references into the document,\n translate through the map the same way.\n5. Attach skills/policies/reference-docs by the new ids, then read them back\n (`list_agent_*`) and diff against what you read in step 1.\n6. `validate_workflow` and re-read each entity to confirm every reference\n resolved, then `request_publish_*`.\nThe connector never carries a secret across: `authConfig` stays placeholders in\nthe new tenant too, and a human fills the real value there.\n\n## Structural workflow edits\n- **Start by reading the spec.** `get_workflow_authoring_spec` returns FOUR\n lists this deploy generates from its own registries: the mutation commands,\n the trigger types, the step types (including the ones you may not author, with\n the reason), and the schedule-rule shapes with a working example each. Neither\n this guide nor the tool descriptions restate any of those lists: a list kept\n in the connector is right only by maintenance, and it has been wrong twice\n already, both times in the direction that costs an agent a 422 on something it\n was told to use. Pass `types` for the live payload schema of a command you\n are about to write.\n- **The payload schemas describe themselves.** What may go inside\n `parameters`, `inputs`, `outputs` and `contract` is IN those schemas \u2014\n including the fact that a bound input DERIVES its contract from the output it\n reads. Ask the spec for the command's `types` rather than looking for prose\n about the shape here; there deliberately is none.\n- **One thing the schemas do not make obvious: which KEY carries the value's\n type, because it is not the same key everywhere.**\n - A TRIGGER PARAMETER and a WORKFLOW CONSTANT use `type`.\n - A step INPUT or OUTPUT uses `kind`.\n - Where a field carries a nested `schema` object, `schema.kind` is what\n wins.\n\n This asymmetry is real, not a typo to normalise: the shapes came from\n different surfaces, and normalising them would make one reader wrong. The\n VALUES differ too \u2014 `get_workflow_authoring_spec` returns one list per key\n (`parameterTypes`, `outputKinds`, `schemaFieldKinds`), and they are not\n interchangeable: only one knows `constant`, and they disagree on how to\n spell a yes/no. Read the list that matches the shape you are writing; this\n guide does not restate them, for the same reason it restates no other list.\n\n Writing `kind` on a trigger parameter is not a 422; it is a key nothing\n reads, so the value silently falls back to text and the workflow runs with\n the wrong thing. Check which of the three you are writing before you write it.\n- `rulesVersion` in that response is a content hash over all four lists. While\n it is unchanged there is nothing to re-fetch; re-read the spec when it changes,\n or when a mutation fails with a 422 suggesting your idea of a command is stale.\n- `apply_workflow_mutations` takes a LIST of commands and applies them in order,\n threading the version for you \u2014 pass the version you read, not one per command.\n- It is NOT transactional. If command N fails, the ones before it stay applied;\n the error tells you how many landed and which index failed. Re-read and resume\n from that index rather than replaying the whole list.\n- `replace_workflow_document` stores the document's `name` and\n `description` \u2014 they sync onto the workflow's own columns, an omitted key\n leaves the stored value alone, and an explicit `\"\"` clears it. `stageId`,\n `capabilityId`, `valueStreamId` and `onFailure` are PATCH-only: changing\n one through this route is REFUSED with a 422 naming the field, and\n round-tripping it unchanged passes. Read, edit, write is therefore safe;\n re-linking a workflow to another stage or capability is its own call.\n- The response is a SUMMARY (version, appliedCount, launchable, validationIssues,\n stepCount, edgeCount), not the document. That is deliberate: a real workflow\n document overflows the response limit, and a successful call would come back\n looking like a failure \u2014 retrying that is how you end up with duplicate steps.\n Ask for the document with `returnDocument: true` or `read_workflow`.\n- Command payloads are STRICT and complete:\n - `add_step` builds a whole step in ONE call \u2014 `name` and `position` are\n required, and `id`, `type`, `config`, `contract`, `inputs` and\n `outputs` are accepted next to them. No follow-up `update_step` is needed\n just to fill the step in.\n - `add_trigger` does the same for a trigger: `parameters` and `outputs`\n go in that call. This is what makes a callable workflow declarable in one\n mutation, since a trigger's parameter list IS its signature.\n - `add_edge` takes the document's own `from`/`to` as well as\n `fromStepId`/`toStepId`, and keeps an `id` you supply.\n - An unknown or misspelled key is a 422 naming it, not a silent drop \u2014 so\n spelling matters and you are told when it is wrong.\n\n## Inputs and constants \u2014 the two lists that belong to the PROCESS\nA workflow declares two whole-list things of its own, both edited the same way\n(read the list, change it, write it back \u2014 there is no per-entry command,\nbecause the identity is the `name` and renaming is the common edit):\n- `set_workflow_inputs` \u2014 what the process NEEDS to start. Carried by every\n start, and the list a caller fills in whichever trigger fired. A start's own\n `parameters` are what that start declares on top; where a name is in both,\n the process-level one wins.\n- `set_workflow_constants` \u2014 what the AUTHOR pins, described below.\nRead both back with `read_workflow_trigger_parameters`, which answers\n`{ inputs, triggers, constants }`.\n\n## Constants \u2014 values the AUTHOR owns\nA constant is applied on EVERY run whichever trigger fired, and it OVERWRITES\nwhatever a caller sent. That is deliberate: a field the operator's form does not\nshow must not become an injection point for anyone who learns its name.\n- Set them with the `set_workflow_constants` command. It replaces the WHOLE\n list, the way `advanced_edit` replaces steps and edges \u2014 read the list, edit\n it, write it back. There is no per-constant command, because a constant's\n identity is its name and renaming is the common edit.\n- Every entry needs a `name`: it is what a step binds to and how the run\n payload keys it. A nameless entry is refused rather than stored, because at\n run time it would simply be skipped.\n- **A constant with no value blocks publishing.** `constant_without_value` is\n an error, not a warning, and it names the constant. It has to be: an entry\n with no value was never written into the run at all, so the workflow validated\n clean, published, and ran without it.\n- ABSENCE, not falsiness. `0`, `\"\"`, `false` and `[]` are values and pass.\n- The value lives in `defaultValue`. On a constant that is not a fallback \u2014\n it IS the value, written on every run. A constant carries no `required`\n (nobody is being asked to fill it in) and needs no flag saying it is one.\n- **A trigger parameter can be pinned the same way**, and the platform reads\n TWO spellings: `constant: true`, or the older `type: \"constant\"`. Both\n mean the author owns it and the caller must not send it, so treat a parameter\n carrying either as off-limits when you build `triggerInput`.\n `read_workflow_trigger_parameters` collapses both into `pinned`, on the\n workflow's constants and on each start's parameters \u2014 read that rather than\n checking the two spellings yourself.\n\n## Two platform invariants that look like bugs\nBoth are deliberate, both run after EVERY edit, and both now report themselves in\nthe mutation response under `systemAdjustments` \u2014 so you no longer have to diff\na document to find out what the platform did.\n- **A bound input's contract is derived, not authored.** An input that reads an\n upstream output takes its contract \u2014 description included \u2014 FROM that output.\n Write the text on the producing step's output; a downstream description changing\n when you edit an output is this rule at work, not the platform overwriting you.\n The inputs it re-derived come back in `rederivedInputs`.\n- **Every step reaches the END point.** The platform guarantees it and wires that\n edge itself; the edges it added or removed come back in `addedEdges` /\n `removedEdges`. An edge you did not ask for is this, not corruption.\n\n## Validating: two questions, two calls\n- `validate_workflow({ workflowId })` checks the STORED workflow against the\n tenant catalog \u2014 it confirms the agents, tools and flows the steps reference\n actually exist. This is the \"can this run?\" answer, and it comes back with\n `catalogChecked: true`.\n- `validate_workflow({ document })` is stateless and read-only-token safe, but\n without a catalog it can only judge STRUCTURE: `launchable` there means the\n graph is sound, not that it will run. It says so with `catalogChecked: false`.\n- Pass exactly one. Before telling a human a workflow is ready, check\n `catalogChecked` \u2014 a green structural verdict is the easiest thing to\n over-read.\n- Read the `issues` rather than only `launchable`: the validator now reports\n a sub-process call with no target, one pointing at itself, one whose target\n is deleted or was never published or has no invocation trigger, a constant\n with no value, and a trigger drawn on the canvas that nothing is wired to.\n Some of those are warnings and still let a workflow publish \u2014 read the\n `severity`, and read the `code`, which is stable where the message is not.\n\n## Triggers\n- A published workflow still does nothing until it has a trigger. A trigger has\n TWO halves, and drawing one on the canvas is only the first.\n- **A schedule is reconciled for you.** Draw it in the document, publish, and\n the firing row is brought into line. That is the exception.\n- **A webhook or conditional trigger is NOT.** Its row must be created\n separately \u2014 `create_webhook_trigger` / `create_conditional_trigger` \u2014\n and publishing will not create one. A webhook drawn and published with no row\n is an endpoint that does not exist; the validator says so with\n `trigger_not_wired`, a WARNING, so the publish still goes through. Take the\n warning seriously: nothing else will tell you.\n- Trigger deletes are HARD deletes \u2014 no restore. Webhook tokens are shown once\n at create/rotate and are never retrievable; hand them straight to your human\n and never store one in an entity field.\n- **A schedule is a claim \u2014 check it.** `run_cron_schedule_now` fires one\n immediately without moving `nextFireAt`, so you can prove a schedule starts\n something instead of waiting until tomorrow to find out it does not. It runs\n for real, with real cost and side effects.\n- **To PAUSE a schedule, disarm it** (`set_cron_schedule_enabled`), never\n delete it. Deleting throws away the rules the author wrote and makes \"stop\n this for a week\" indistinguishable from \"we do not do this any more\".\n- `create_cron_schedule` takes EITHER `cronExpr` OR `rules`, and the\n trigger must exist in the PUBLISHED document. For the rule shapes, read\n `scheduleRuleKinds` from `get_workflow_authoring_spec` \u2014 do not invent one.\n- `list_all_cron_schedules` answers \"what runs tonight?\" across the tenant;\n `reconcile_cron_schedules` answers \"is that actually what runs?\". The second\n reports rather than tidying silently and never arms something switched off.\n- **A conditional trigger without a CHECK starts the workflow every beat.** It\n wakes on its interval and, with nothing set, runs regardless of whether there\n was anything to do \u2014 a mailbox on fifteen minutes then makes ninety-six empty\n runs a day. Set `checkKind` on `create_conditional_trigger`, or on an\n existing one with `update_conditional_trigger`; every trigger authored\n before checks existed has none, so read `checkKind` in\n `list_conditional_triggers` before assuming otherwise.\n- `checkKind: \"automatic\"` is ONE tool call and one rule on its answer \u2014 no\n model, so it is the cheap way to ask \"is there anything there?\". Its\n `checkConfig` is `{ toolId, inputs?, rule: { field, op, value } }`, where\n `field` names a key OF THE TOOL'S ANSWER. A rule pointing at a field the\n tool never returns is reported as a broken setup, not as \"condition not met\".\n `\"agent\"` is reserved for a model judging the condition and is refused\n today. Do not pre-validate a check here \u2014 the backend judges it with the same\n function the dispatcher runs when the trigger fires, and its refusal says\n what to change.\n- **To take a check off again, send `checkKind: \"\"`** \u2014 the empty string. It\n clears the kind and its config together and returns the trigger to starting\n every beat. Omitting the field leaves the check standing, which is why the\n empty string exists at all.\n\n## Evaluating what you built\n- There is no findings endpoint and no evaluator entity. To judge a run, read it:\n `read_run` (its `validatorVerdicts` and `agentInvocations`) and\n `read_run_trace` (the step-by-step tool calls).\n- **Start with `read_run_outline`, not `read_run`.** The outline is the run's\n table of contents and carries no bodies, so it costs what the run's SHAPE\n costs rather than its content \u2014 a fan-out over four thousand items reads about\n as cheaply as one over four. Then open only what you need:\n `read_run_value` for one large step value (by the digest in `stepStates`),\n `read_run_invocation_messages` for one agent's transcript (by the id in\n `agentInvocations`). Reading a whole run to find one message is the habit\n this replaces.\n- `itemCap` on the outline bounds items listed per fan-out step; the remainder\n is counted in `counts.truncated`, never dropped in silence.\n- **What an agent wrote to itself is readable.** `list_run_session_memory`\n lists the files an agent left during a run (metadata only) and\n `read_run_session_memory_file` opens one. When the trace shows a decision but\n not what it was reading, this is usually where the reason is. Workflow-bound\n reference material is NOT here \u2014 that lives in `reference_docs`.\n- **`list_todo_steps`** is every step in the tenant waiting on a human, across\n all runs; `read_run_waiting_on` is the same question for one run you already\n have. It is PAGED over the waiting RUNS, so `items` can be longer than\n `pageSize` \u2014 one run may park several steps. Follow `nextCursor` until it\n is null before concluding anything about how much is waiting.\n- Runs are the only thing with a real archive state \u2014 `archive_run` is\n reversible, `bulk_delete_runs` is not.\n\n## Subworkflows \u2014 one workflow calling another\nBoth halves live in the workflow DOCUMENT, so both are ordinary\n`apply_workflow_mutations` work. There is no separate \"link\" route.\n- **To make a workflow callable**, it needs TWO things: a trigger with\n `typeId: \"subprocess-invocation\"` (`add_trigger`), which is what makes it\n callable at all, and a declared SIGNATURE.\n- **The signature belongs to the PROCESS, not to the trigger.** Declare it with\n `set_workflow_inputs` \u2014 one list, carried by every start, and the same list\n a caller of any kind fills in. A trigger's own `parameters` are what THAT\n start declares on top; `parameters` goes in the `add_trigger` call itself,\n so a start that does add fields needs no follow-up `update_trigger`.\n- Older documents declared everything on the invocation trigger instead, and\n that still works: both are read, and where a name appears in both the\n PROCESS-level one wins. When you are editing a workflow you did not author,\n read `read_workflow_trigger_parameters` and see which list actually holds\n its fields before adding to either.\n- `set_workflow_inputs` REPLACES the whole list, like\n `set_workflow_constants`: read, edit, write back. An entry with no `name`\n is refused rather than stored \u2014 the name is how a caller passes the value and\n how the run payload keys it, so a nameless one would be skipped silently at\n run time.\n- For what an input or a parameter may contain, ask\n `get_workflow_authoring_spec` for the payload schema of the command you are\n about to write, rather than a shape written down here.\n- **It must also be PUBLISHED.** The catalogue reads the published document, so\n a draft-only workflow comes back `callable: false` with \"Never published\".\n Authoring the caller first and publishing the callee later is a run-time\n failure waiting to happen.\n- **To call it**, add a step with `type: \"subprocess\"` and\n `config: { targetWorkflowId, ownerAgentId }` \u2014 both required, both workflow/\n agent ids. Bind the step's `inputs` by NAME to the callee's `parameters`;\n that is the whole mapping, there is no separate argument block.\n- `config.waitForCompletion` is **IGNORED** if you write it. Drawing a step\n after this one already means \"after\", so waiting is implied. The one thing the\n graph cannot say is fire-and-forget: `config.fireAndForget: true`, and then\n nothing downstream may depend on the result.\n- `config.errorStrategy` (\"fail\" | \"skip\") is only honoured when the step\n ITERATES (`config.iteration.enabled`). On a single call \"skip\" would report\n a failed child as success, so it is forced to fail-fast.\n- **A workflow cannot call itself** \u2014 every run would spawn a child that reaches\n the same step again. Pass `exclude: <the workflow you are editing>` to\n `list_callable_workflows` and it is kept out of the list.\n- **What comes back** is the callee's `outcomes`: its end steps, each with the\n fields bound into it. WHICH end was reached is itself part of the answer.\n- **`validate_workflow` checks this now.** A missing target, a workflow\n calling itself, a target that is deleted, never published, or has no\n invocation trigger \u2014 each has its own issue code, and the ones that resolve to\n nothing are errors that block publishing. Still run\n `list_callable_workflows` BEFORE you author the step: it is how you pick a\n target and see the interface you are binding to, where the validator only\n tells you afterwards that the one you picked was wrong.\n\n## Secrets\n- Never handle a real credential. A connector's `authConfig` takes placeholders\n only (\"{{ MY_SECRET }}\" or \"\"); a human fills the real value in Axonity. This\n is enforced \u2014 a write carrying something that looks like a real secret is\n rejected before it leaves this connector.\n- You CAN read the catalogue: `list_secrets` (id, name, authType) and\n `read_secret`. That is how you get the id for a connector's\n `authConfig.secretId` \u2014 do not ask a human to copy one out of the UI.\n- Before you wire a connector to a secret, check `valueKeys` on\n `read_secret`. An empty list means nobody has filled the secret in yet: the\n connector will author fine and fail at RUN time. Say so to your human, with the\n secret's name, rather than reporting the wiring as done.\n- You cannot create, change or delete a secret. That is a human act in Axonity \u2192\n Settings \u2192 Secrets, and the backend refuses it from this connector's token.\n- A secret's `metadata` (connection config, e.g. a session_cookie handshake)\n comes back with credential-shaped entries withheld, listed under\n `metadataRedacted`. If you need one of those values, a human reads it in\n Axonity \u2014 do not try another route to it.\n\n## Tables \u2014 the tenant's own reference data\nA table is an authored library element that HOLDS ROWS: the pricing bands, the\nregion-to-owner map, the list of accepted reason codes. A person designs the\ncolumns and maintains the content; agents and decisions read it.\n\n**When a table is the right element.** Reach for one when the CONTENT is the\npoint and it changes without the process changing.\n- Not an `output_schema`: that describes a SHAPE and holds no data. If you\n find yourself putting example values in a schema, you wanted a table.\n- Not a workflow constant: a constant belongs to ONE workflow and is edited in\n its document. A table is shared, and three workflows reading the same rows is\n the case it exists for.\n- Not a function tool with a list inside it: that makes changing a row an act of\n editing code, reviewing it and publishing a tool. A business user maintains a\n table; nobody should need you to change a postcode.\n\n**Static or dynamic \u2014 who owns the rows.**\n- `isDynamic: false` (the default) is reference data the AUTHOR maintains. A\n workflow reads it and cannot change it. `allowedOperations` must be empty:\n a permission nothing honours is refused, not stored.\n- `isDynamic: true` lets a workflow change the rows, limited to\n `allowedOperations` \u2014 any of `add` / `update` / `delete`. READING IS\n NEVER LISTED there: it is what a table is for and is always allowed.\n- You edit rows through `add_data_table_row` / `update_data_table_row` /\n `delete_data_table_row` whatever the table's mode says \u2014 those grants are\n about what a RUN may do, not about authoring.\n\n**Never put rows in `update_data_table`.** `rows` and `columns` are\nwhole-collection fields: sending one row REPLACES the table's content and\ndeletes everything else. The row tools address a single row by a match\n(`matchColumn`/`matchValue`) and cannot touch the rest \u2014 use them. Reach for\n`update_data_table({ fields: { rows } })` only when you genuinely mean to\nreplace the whole content, and never as a way to append.\n\n**The rule that bites hardest: derived tools follow the PUBLISHED table.** A\npublished table mints its own CRUD tools, so granting an agent access to one is\nordinary tool granting \u2014 take a `toolId` from `list_data_table_tools` and put\nit in the agent's `toolIds`. But those tools follow the table's PUBLISHED\nversion. An author who ticked \"may add rows\" and has not published has granted\nnothing, and the tool that would let a run act on it does not exist yet.\n`list_data_table_tools` reports `offered` (what the draft would yield),\n`toolId` (whether a row exists) and `isLive` (whether a run can reach it)\nseparately for exactly this reason. Read all three before concluding a grant\nlanded. Same rule as everywhere else here \u2014 a draft changes nothing until it is\npublished \u2014 and it is the first thing an agent gets wrong about tables.\n\n**Routing a decision on a table.** A decision can branch by looking a value up\nin one column and taking the branch named in another, with\n`builtin: \"evaluators.table_lookup\"`. The behaviour worth knowing, because no\ncatalogue states it: THE CELL'S VALUE IS THE BRANCH'S OUTCOME KEY \u2014 not a new\nfield, and not something you map afterwards. Every value in the result column\nmust be the outcome key of an outgoing branch, or publishing the workflow is\nrefused. The table must be PUBLISHED: a run reads the published snapshot, so a\ntable that is only saved routes nothing. For the argument names it reads, and\nfor every other selectable evaluator, read `decisionEvaluators` from\n`get_workflow_authoring_spec` \u2014 generated from the registry that dispatches\nthem, so it cannot advertise one the platform would not run.\n\n**Column kinds** come from the same place: `tableColumnKinds` in\n`get_workflow_authoring_spec`. It is a FOURTH vocabulary beside the three for\nparameters, outputs and schema fields, with its own spellings \u2014 do not carry a\nvalue across from one of the others, and do not guess. Every column needs a\n`description`: an agent reads it to know what the column is for, and a save\nwithout one is refused.\n\n**`list_data_tables` is PAGED**, alone among the library lists \u2014 a tenant's\nreference data has no ceiling. Page one is not the library. Follow\n`nextCursor` while `hasMore` is true, or better, narrow in the query:\n`name` is exact and unique per workspace, so \"does one called X already\nexist\" is a single call rather than a walk. The page carries `rowCount`, never\nthe rows; the rows come from `read_data_table`.\n\n## Toolboxes \u2014 where a tool is filed\n- A toolbox is a per-tenant grouping label over tools. Read `list_toolboxes`\n before `create_tool` and pass the box's id as `toolboxId`; a tool created\n without one is ungrouped. Move an existing tool with\n `assign_tool_toolbox` (`toolboxId: null` takes it out of its box).\n- `set_toolbox_tools` DECLARES the membership \u2014 it does not add to it. A tool\n in the box and absent from your list is evicted. To add one tool, read the\n box's contents first, or use `assign_tool_toolbox`, which cannot evict\n anything by accident. A tool is in at most one box.\n- A toolbox NEVER changes what an agent may call. An agent is linked to\n individual tools (`agent.toolIds`), never to a box; there is no route that\n grants a whole box, and \"give this agent the Carerix toolbox\" is a bulk write\n of individual links. What the box decides is how a tool is ADVERTISED: a boxed\n tool with `surfacing: \"inherit\"` is found via discover_tools instead of\n riding in every prompt. Read `effectiveSurfacing` on the tool to answer \"is\n it in the prompt?\"; `surfacing` is the raw stored choice.\n- Deleting a toolbox does NOT delete its tools \u2014 they survive, ungrouped. The\n box itself has no restore.\n- Platform-shipped tools cannot be moved. The `Axonity`, `Checks` and\n `Branching` boxes hold locked tools; the API refuses and NAMES the tool it\n refused. Read that name to your human instead of bisecting the selection.\n- `set_toolbox_auth` sets the credential a box's tools SHARE \u2014 ten Microsoft\n Mail tools, one mailbox, said once. A tool with its own auth keeps it; only a\n tool with none inherits. Same rule as anywhere else: point `secretId` at a\n stored secret, never a real value. Before you clear or replace it, or delete\n the box, call `list_toolbox_dependent_tools` \u2014 it names the tools that would\n start failing at run time with a bare 401.\n\n## Tenant\n- Your token fixes the tenant. You cannot act across tenants; never send a\n tenant id in a body.\n- `read_model_tier_map` says what `capabilityTier` actually RESOLVES TO on\n this tenant. The tier is the field you write; the model is what you are\n choosing. Read it before you pick one.\n- When a run does not start, look outward before blaming the workflow:\n `read_concurrency_status` (is the tenant at its cap?),\n `read_queue_overview` (is dispatch alive?), `list_task_queue` (did\n something fail in the layer beneath the run?). `read_for_each_rate` explains\n a fan-out that is pacing itself rather than stalling.\n- You can READ those and not change them. Caps, rate ceilings and the tier map\n are operator decisions \u2014 report what you found, and to whom, rather than\n looking for another route to it.\n- `read_deploy_contract` says what THIS deploy speaks: build, environment and\n the routes it mounts. Read it when a call fails in a way that suggests the\n backend is older or newer than you expect.\n- `list_users` is where an `ownerId` comes from. Look one up instead of\n asking a human to copy it out of the UI.\n- `list_audit_events({ actorKind: \"service_token\" })` reads back what external\n agents \u2014 including you \u2014 actually changed.\n";
45
52
  /** Where this deploy serves its prompt-element placement rules. */
46
53
  export declare const PLACEMENT_ROUTE = "/api/v1/authoring/prompt-placement";
47
- /**
48
- * Read this deploy's placement rules, or say why not.
49
- *
50
- * Exported for testing. Any failure — an older backend without the route (404),
51
- * a network error, a body without markdown — yields the notice; never throws.
52
- */
54
+ /** Where this deploy serves its rules for writing the semantic layer. */
55
+ export declare const SEMANTIC_KNOWLEDGE_ROUTE = "/api/v1/authoring/semantic-knowledge";
56
+ /** Read this deploy's placement rules, or say why not. Exported for testing. */
53
57
  export declare function readPlacementRules(client: AxonityClient): Promise<string>;
58
+ /** Read this deploy's semantic-knowledge rules, or say why not. Exported for testing. */
59
+ export declare function readSemanticKnowledgeRules(client: AxonityClient): Promise<string>;
54
60
  export declare function registerConventions(server: McpServer, client: AxonityClient): void;
@@ -38,6 +38,13 @@
38
38
  * leave prompt elements alone; it never substitutes a local copy, because a
39
39
  * local copy is what went wrong. The prompt-SNIPPET mechanics (attach, reorder,
40
40
  * wildcard) stay below — those are how the API works, not where things go.
41
+ *
42
+ * THE SEMANTIC-KNOWLEDGE RULES ARE THE PLATFORM'S TOO, and go the same way —
43
+ * live from `GET /api/v1/authoring/semantic-knowledge`, never a local copy —
44
+ * with one difference: they are NOT appended to every call. They only matter to
45
+ * an agent building a workspace's semantic layer, so they get their own tool,
46
+ * `axonity_semantic_conventions`, and this guide carries one line pointing at
47
+ * it. Findable for whoever needs them, free for everyone else.
41
48
  */
42
49
  export const CONVENTIONS = `# Authoring conventions for Axonity entities
43
50
 
@@ -336,6 +343,10 @@ made any time before you attach them.
336
343
  ### skill / policy / reference_doc
337
344
  - Memory entities attached to agents (and skills also to workflows). Create them,
338
345
  then wire with the \`attach_*\` tools — see Wiring.
346
+ - Building the SEMANTIC LAYER — reference docs that say what a table means, what
347
+ a word means, which query fills which table (\`semanticKind\` and the fields
348
+ that go with it)? Read \`axonity_semantic_conventions\` first. Those rules are
349
+ served by the platform; this guide does not restate them.
339
350
 
340
351
  ### prompt_snippet
341
352
  - Reusable prompt fragments; a normal entity. Wire-level oddity:
@@ -979,6 +990,8 @@ the rows; the rows come from \`read_data_table\`.
979
990
  `;
980
991
  /** Where this deploy serves its prompt-element placement rules. */
981
992
  export const PLACEMENT_ROUTE = "/api/v1/authoring/prompt-placement";
993
+ /** Where this deploy serves its rules for writing the semantic layer. */
994
+ export const SEMANTIC_KNOWLEDGE_ROUTE = "/api/v1/authoring/semantic-knowledge";
982
995
  /**
983
996
  * Said instead of the rules when they cannot be read. NOT a fallback: a local
984
997
  * copy of the rules is what drifted from the platform in the first place, so
@@ -991,29 +1004,45 @@ const PLACEMENT_UNAVAILABLE = "## Prompt element placement — NOT AVAILABLE\n\n
991
1004
  "must not be changed until they can be read: call `axonity_conventions` " +
992
1005
  "again, and if it still fails, report it rather than deciding placement " +
993
1006
  "yourself.";
1007
+ /** The same refusal for the semantic layer: no rules here, so write no knowledge. */
1008
+ const SEMANTIC_KNOWLEDGE_UNAVAILABLE = "## Semantic knowledge — NOT AVAILABLE\n\n" +
1009
+ "The rules for writing the semantic layer could not be read from this deploy " +
1010
+ `(\`GET ${SEMANTIC_KNOWLEDGE_ROUTE}\`). This connector does not carry a copy ` +
1011
+ "of them. Write no semantic knowledge — no reference doc with a " +
1012
+ "`semanticKind` — until they can be read: call " +
1013
+ "`axonity_semantic_conventions` again, and if it still fails, report it " +
1014
+ "rather than deciding what the knowledge should say yourself.";
994
1015
  /**
995
- * Read this deploy's placement rules, or say why not.
996
- *
997
- * Exported for testing. Any failure — an older backend without the route (404),
998
- * a network error, a body without markdown — yields the notice; never throws.
1016
+ * GET a rules route and introduce its markdown with its `rulesVersion`, or
1017
+ * return `unavailable`. Any failure — an older backend without the route
1018
+ * (404), a network error, a body without markdown — yields the notice; never
1019
+ * throws.
999
1020
  */
1000
- export async function readPlacementRules(client) {
1021
+ async function readServedRules(client, route, what, unavailable) {
1001
1022
  let response;
1002
1023
  try {
1003
- response = (await client.get(PLACEMENT_ROUTE));
1024
+ response = (await client.get(route));
1004
1025
  }
1005
1026
  catch {
1006
- return PLACEMENT_UNAVAILABLE;
1027
+ return unavailable;
1007
1028
  }
1008
1029
  const markdown = response?.markdown;
1009
1030
  if (typeof markdown !== "string" || markdown.trim() === "") {
1010
- return PLACEMENT_UNAVAILABLE;
1031
+ return unavailable;
1011
1032
  }
1012
1033
  const version = typeof response.rulesVersion === "string" ? response.rulesVersion : "unknown";
1013
- return ("The prompt-element placement rules below are served live by this deploy " +
1034
+ return (`The ${what} below are served live by this deploy ` +
1014
1035
  `(rulesVersion \`${version}\`).\n\n` +
1015
1036
  markdown);
1016
1037
  }
1038
+ /** Read this deploy's placement rules, or say why not. Exported for testing. */
1039
+ export async function readPlacementRules(client) {
1040
+ return readServedRules(client, PLACEMENT_ROUTE, "prompt-element placement rules", PLACEMENT_UNAVAILABLE);
1041
+ }
1042
+ /** Read this deploy's semantic-knowledge rules, or say why not. Exported for testing. */
1043
+ export async function readSemanticKnowledgeRules(client) {
1044
+ return readServedRules(client, SEMANTIC_KNOWLEDGE_ROUTE, "rules for writing the semantic layer", SEMANTIC_KNOWLEDGE_UNAVAILABLE);
1045
+ }
1017
1046
  export function registerConventions(server, client) {
1018
1047
  server.tool("axonity_conventions", "Read the authoring conventions BEFORE creating or updating anything: the " +
1019
1048
  "draft→publish lifecycle, optimistic locking, per-entity create contracts " +
@@ -1030,5 +1059,14 @@ export function registerConventions(server, client) {
1030
1059
  },
1031
1060
  ],
1032
1061
  }));
1062
+ server.tool("axonity_semantic_conventions", "Read BEFORE building a workspace's semantic layer — reference docs with a " +
1063
+ "`semanticKind` that say what a table means, what a word means, or which " +
1064
+ "query fills which table. Returns this deploy's rules for writing that " +
1065
+ "knowledge: what each kind is for, what belongs in it and what does not, " +
1066
+ "and what a source query must say about one row of its result. Read live " +
1067
+ "from the platform on every call, with its rulesVersion. Not needed for " +
1068
+ "anything else.", {}, async () => ({
1069
+ content: [{ type: "text", text: await readSemanticKnowledgeRules(client) }],
1070
+ }));
1033
1071
  }
1034
1072
  //# sourceMappingURL=conventions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAMH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAI,EAAE,MAAM,0BAA0B,CAAC,MAAM,CAAC,EAAE,CAAC;KACrF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Warehouses, the syncs that copy from them, and the numbers read off the
3
+ * tables they fill (axonity-mcp#78, the connector half of axonity-flow#1849).
4
+ *
5
+ * The plain entity verbs — list/read/create/update/delete/restore for a data
6
+ * source, a table relationship and a dashboard — come from `registerEntityTools`
7
+ * (see `ENTITIES` in index.ts). What is here is everything that does not fit
8
+ * that shape: asking a warehouse something, the syncs that belong to ONE source,
9
+ * the measures a dashboard reads, and duplicating a dashboard.
10
+ *
11
+ * **Most writes here are administrator-only on the backend**, and a service
12
+ * token always resolves as a member. So against today's platform those calls
13
+ * answer 403, and `ForbiddenError` says why in words rather than as a generic
14
+ * "not allowed" — the tool descriptions say it up front as well, so an agent
15
+ * does not spend three calls discovering it. Whether that is the right line is
16
+ * the platform's decision, not this connector's: the tools exist so that the
17
+ * moment the backend lets a token through, they work.
18
+ *
19
+ * **Nothing here holds a credential.** A data source points at a secret by
20
+ * `secretId`; the key itself is put in the vault by a human (secret writes are
21
+ * deny-listed), and the source never carries it.
22
+ */
23
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
24
+ import type { AxonityClient } from "../client.js";
25
+ /** The sentence every admin-only tool here carries, so it is said once. */
26
+ export declare const ADMIN_ONLY: string;
27
+ export declare function registerDataSourceTools(server: McpServer, client: AxonityClient): void;
28
+ export declare function registerMeasureTools(server: McpServer, client: AxonityClient): void;
29
+ export declare function registerDashboardTools(server: McpServer, client: AxonityClient): void;
@@ -0,0 +1,229 @@
1
+ /**
2
+ * Warehouses, the syncs that copy from them, and the numbers read off the
3
+ * tables they fill (axonity-mcp#78, the connector half of axonity-flow#1849).
4
+ *
5
+ * The plain entity verbs — list/read/create/update/delete/restore for a data
6
+ * source, a table relationship and a dashboard — come from `registerEntityTools`
7
+ * (see `ENTITIES` in index.ts). What is here is everything that does not fit
8
+ * that shape: asking a warehouse something, the syncs that belong to ONE source,
9
+ * the measures a dashboard reads, and duplicating a dashboard.
10
+ *
11
+ * **Most writes here are administrator-only on the backend**, and a service
12
+ * token always resolves as a member. So against today's platform those calls
13
+ * answer 403, and `ForbiddenError` says why in words rather than as a generic
14
+ * "not allowed" — the tool descriptions say it up front as well, so an agent
15
+ * does not spend three calls discovering it. Whether that is the right line is
16
+ * the platform's decision, not this connector's: the tools exist so that the
17
+ * moment the backend lets a token through, they work.
18
+ *
19
+ * **Nothing here holds a credential.** A data source points at a secret by
20
+ * `secretId`; the key itself is put in the vault by a human (secret writes are
21
+ * deny-listed), and the source never carries it.
22
+ */
23
+ import { z } from "zod";
24
+ import { guard, jsonResult } from "./result.js";
25
+ const SOURCES = "/api/v1/data-sources";
26
+ const MEASURES = "/api/v1/measures";
27
+ /** The sentence every admin-only tool here carries, so it is said once. */
28
+ export const ADMIN_ONLY = "\n\nADMINISTRATOR ONLY. The backend lets only a workspace administrator do " +
29
+ "this, and a service token always counts as a member — so a 403 \"Only " +
30
+ "administrators can perform this action\" means exactly that, not a broken " +
31
+ "call and not a missing scope. Do not retry: tell your human, who can do it " +
32
+ "in Axonity.";
33
+ const SOURCE_ID = z.string().describe("The data source's id.");
34
+ const SYNC_ID = z.string().describe("The sync's id (from list_data_source_syncs).");
35
+ export function registerDataSourceTools(server, client) {
36
+ server.tool("list_data_source_drivers", "Which warehouses can be connected, and what each one needs. Read-only. " +
37
+ "\n\nREAD THIS BEFORE create_data_source. Each driver lists its " +
38
+ "`configFields` — name, label, description, required — and those names " +
39
+ "are exactly the keys `config` takes. Do not assume BigQuery's fields: " +
40
+ "the list is the platform's own, so a warehouse it adds works without " +
41
+ "this connector changing. " +
42
+ "\n\n`capabilities.pricesBeforeRunning` says whether a byte limit " +
43
+ "(`policy.maxBytesBilled`) can actually stop a query on that warehouse; " +
44
+ "where it is false, use `policy.maxSeconds` instead. `credentialKinds` " +
45
+ "says which kind of secret the source's `secretId` must point at.", {}, async () => guard(async () => jsonResult(await client.get(`${SOURCES}/drivers`))));
46
+ server.tool("test_data_source", "Ask the warehouse the cheapest question there is, and report what it " +
47
+ "said. Use it right after create_data_source, and whenever a sync or " +
48
+ "query fails for a reason that sounds like the connection. " +
49
+ "\n\nA FAILURE IS AN ANSWER, NOT AN ERROR: the response is " +
50
+ "`{ ok, message, checkedAt }`, and `ok: false` with a message is the " +
51
+ "warehouse telling you what is wrong (missing credential, wrong project, " +
52
+ "no access). Read `message` — the call itself succeeded." +
53
+ ADMIN_ONLY, { id: SOURCE_ID }, async ({ id }) => guard(async () => jsonResult(await client.post(`${SOURCES}/${id}/test`))));
54
+ server.tool("read_data_source_schema", "Which tables and columns the warehouse holds. Read-only, and free: it " +
55
+ "reads the warehouse's own catalogue, not the data. " +
56
+ "\n\nEach table's `name` is `container.table` — what you write in a " +
57
+ "query. `containerWord` is what this warehouse calls the container " +
58
+ "(\"dataset\" on BigQuery, \"schema\" on PostgreSQL). Column types are " +
59
+ "the warehouse's own names, passed through. Read this before writing a " +
60
+ "query or a sync, rather than guessing table names.", { id: SOURCE_ID }, async ({ id }) => guard(async () => jsonResult(await client.get(`${SOURCES}/${id}/schema`))));
61
+ server.tool("query_data_source", "Run a READ-ONLY SQL query against the warehouse and get the rows back. " +
62
+ "For looking — checking what a table holds, trying the query a sync " +
63
+ "will run. To fill a table regularly, use create_data_source_sync. " +
64
+ "\n\nTHE ROWS ARE CAPPED. `truncated: true` means rows were left out: " +
65
+ "`rowCount` is what came back, `totalRows` is what matched. Never report " +
66
+ "a count or a total off a truncated answer — aggregate in the SQL " +
67
+ "instead. `bytesScanned` is what it cost. " +
68
+ "\n\nTWO DIFFERENT FAILURES: a 422 is Axonity refusing the QUERY (it " +
69
+ "writes, reads a dataset the source forbids, names a personal column or " +
70
+ "uses `*` where personal columns are configured, would scan more than " +
71
+ "the source allows) — the reason says what to change. A 502 is the " +
72
+ "WAREHOUSE refusing or not answering — the query may be fine; do not " +
73
+ "rewrite it, check test_data_source." +
74
+ ADMIN_ONLY, {
75
+ id: SOURCE_ID,
76
+ sql: z
77
+ .string()
78
+ .describe("The query, in the warehouse's own dialect. Read-only: anything " +
79
+ "that writes is refused. Name tables as read_data_source_schema " +
80
+ "spells them."),
81
+ maxRows: z
82
+ .number()
83
+ .int()
84
+ .optional()
85
+ .describe("How many rows you want back. Clamped by the platform — a bigger " +
86
+ "answer belongs in a sync, not in a response."),
87
+ }, async ({ id, sql, maxRows }) => guard(async () => jsonResult(await client.post(`${SOURCES}/${id}/query`, {
88
+ sql,
89
+ ...(maxRows !== undefined ? { maxRows } : {}),
90
+ }))));
91
+ server.tool("list_data_source_syncs", "The syncs of ONE data source: the queries that keep tables filled from " +
92
+ "that warehouse, on a schedule. Read-only. " +
93
+ "\n\nEach sync says when it runs next (`nextFireAt`), when it last ran " +
94
+ "(`lastRunAt`), how many rows the table held afterwards " +
95
+ "(`lastRowCount`), and — when the last attempt wrote nothing — why " +
96
+ "(`lastError`). A `lastError` here is the first thing to read when a " +
97
+ "dashboard number looks stale.", { id: SOURCE_ID }, async ({ id }) => guard(async () => jsonResult(await client.get(`${SOURCES}/${id}/syncs`))));
98
+ server.tool("create_data_source_sync", "Set up a query that fills a table from this warehouse on a schedule. " +
99
+ "\n\nThe table must be a DYNAMIC table (create_data_table with " +
100
+ "`isDynamic: true`). Its rows then come from here, not from authoring. " +
101
+ "Try the SQL with query_data_source first: what one row of its result " +
102
+ "means decides what the table can be asked afterwards. " +
103
+ "\n\nThe response says when it will first run (`nextFireAt`). To run " +
104
+ "it now, follow with run_data_source_sync." +
105
+ ADMIN_ONLY, {
106
+ id: SOURCE_ID,
107
+ name: z.string().describe("What the sync is called."),
108
+ description: z.string().optional().describe("What it fills, and why."),
109
+ tableId: z
110
+ .string()
111
+ .describe("The dynamic table the result lands in (a data_table id)."),
112
+ sql: z
113
+ .string()
114
+ .describe("The query whose RESULT is copied into the table. Read-only, in the " +
115
+ "warehouse's own dialect."),
116
+ mode: z
117
+ .enum(["append", "upsert"])
118
+ .optional()
119
+ .describe("`upsert` (default) replaces rows whose key columns match and adds " +
120
+ "the rest. `append` adds everything that came back, every run — " +
121
+ "only right when each run returns NEW rows."),
122
+ keyColumns: z
123
+ .array(z.string())
124
+ .optional()
125
+ .describe("Which columns identify a row, for `upsert`. Without them an upsert " +
126
+ "has nothing to match on."),
127
+ cronExpr: z
128
+ .string()
129
+ .describe('When it runs, as a five-field cron expression, e.g. "0 6 * * *".'),
130
+ timezone: z
131
+ .string()
132
+ .optional()
133
+ .describe('The time zone the cron expression is read in. Defaults to "UTC".'),
134
+ enabled: z
135
+ .boolean()
136
+ .optional()
137
+ .describe("Whether it runs on its schedule. Defaults to true."),
138
+ }, async ({ id, ...fields }) => guard(async () => jsonResult(await client.post(`${SOURCES}/${id}/syncs`, fields))));
139
+ server.tool("run_data_source_sync", "Bring a sync's next run forward to now. " +
140
+ "\n\nTHIS DOES NOT WAIT FOR THE RESULT. The query can take tens of " +
141
+ "seconds, so the platform accepts the request and its scheduler runs " +
142
+ "it. The response is the sync with its new `nextFireAt`. To see how it " +
143
+ "went, read list_data_source_syncs again after a moment: `lastRunAt`, " +
144
+ "`lastRowCount` and `lastError` describe the run." +
145
+ ADMIN_ONLY, { id: SOURCE_ID, syncId: SYNC_ID }, async ({ id, syncId }) => guard(async () => jsonResult(await client.post(`${SOURCES}/${id}/syncs/${syncId}/run`))));
146
+ server.tool("delete_data_source_sync", "Stop a sync. The rows it already wrote STAY in the table; it simply " +
147
+ "stops refreshing them. Recoverable with restore_data_source_sync." +
148
+ ADMIN_ONLY, {
149
+ id: SOURCE_ID,
150
+ syncId: SYNC_ID,
151
+ confirm: z
152
+ .literal(true)
153
+ .describe("Must be true. Acknowledges the table stops being refreshed."),
154
+ }, async ({ id, syncId }) => guard(async () => jsonResult(await client.del(`${SOURCES}/${id}/syncs/${syncId}`))));
155
+ server.tool("restore_data_source_sync", "Bring a stopped sync back. It comes back SWITCHED OFF on purpose — a " +
156
+ "sync is usually stopped because it did the wrong thing — so switching " +
157
+ "it on again is a separate, deliberate step in Axonity." +
158
+ ADMIN_ONLY, { id: SOURCE_ID, syncId: SYNC_ID }, async ({ id, syncId }) => guard(async () => jsonResult(await client.post(`${SOURCES}/${id}/syncs/${syncId}/restore`))));
159
+ }
160
+ /** The period names a measure question accepts. Mirrors `PeriodPreset`. */
161
+ const PERIODS = "today, this_week, last_week, this_month, last_month, this_quarter, " +
162
+ "year_to_date, last_30_days, last_12_months, all_time";
163
+ export function registerMeasureTools(server, client) {
164
+ server.tool("read_measure_design", "What can be asked of one dynamic table: its published measures, its " +
165
+ "columns and its time axis. Read-only. " +
166
+ "\n\nRead this before query_measures or before putting a tile on a " +
167
+ "dashboard — a tile names a measure by the id or name this returns. " +
168
+ "Measures themselves are DEFINED on the table (update_data_table) and " +
169
+ "go live when the table is published; this only reads them.", {
170
+ tableId: z.string().describe("The dynamic table's id."),
171
+ useDraft: z
172
+ .boolean()
173
+ .optional()
174
+ .describe("Read the table's working design instead of its published one — to " +
175
+ "preview a measure before publishing. Defaults to false."),
176
+ }, async ({ tableId, useDraft }) => guard(async () => jsonResult(await client.get(`${MEASURES}/tables/${tableId}`, { useDraft }))));
177
+ server.tool("query_measures", "Compute measures: up to 40 questions in one call, each answered on its " +
178
+ "own. Read-only. This is where a dashboard's numbers come from. " +
179
+ "\n\nEach question is " +
180
+ "`{ key, tableId, measure, period?, start?, end?, compare?, grain?, " +
181
+ "splitBy?, filters?, limit?, useDraft? }`. `key` is your own label and " +
182
+ "comes back on the answer. `period` is one of: " +
183
+ PERIODS +
184
+ " (default this_month) — or set it to null and send `start`/`end` " +
185
+ "(YYYY-MM-DD) for a custom range. `compare` is none, previous_period or " +
186
+ "previous_year. `grain` (none, auto, day, week, month, quarter, year) " +
187
+ "draws a series. `splitBy` names a column to group by; `limit` (1-50) " +
188
+ "keeps the largest groups. " +
189
+ "\n\nONE BAD QUESTION DOES NOT FAIL THE CALL: every answer carries " +
190
+ "`ok`, and `ok: false` comes with an `error` of its own. Check each one. " +
191
+ "\n\n`freshAsOf` says how old the newest row behind the number is; " +
192
+ "`certified: false` means it was computed from a draft. Say so when you " +
193
+ "report a number that is either stale or uncertified.", {
194
+ queries: z
195
+ .array(z.record(z.unknown()))
196
+ .describe("The questions, 1 to 40, in the shape described above."),
197
+ }, async ({ queries }) => guard(async () => jsonResult(await client.post(`${MEASURES}/query`, { queries }))));
198
+ server.tool("list_measure_rows", "The first rows of a published dynamic table in an order — what a list " +
199
+ "tile shows (\"the ten biggest orders this month\"). Read-only. " +
200
+ "\n\n`matched` in the answer is how many rows matched before the limit, " +
201
+ "so you can say \"10 of 312\" rather than imply there are ten.", {
202
+ tableId: z.string().describe("The dynamic table's id."),
203
+ sortBy: z.string().optional().describe("The column to order by."),
204
+ descending: z
205
+ .boolean()
206
+ .optional()
207
+ .describe("Largest first. Defaults to true."),
208
+ limit: z.number().int().optional().describe("How many rows, 1-50. Defaults to 10."),
209
+ period: z
210
+ .string()
211
+ .optional()
212
+ .describe(`Only rows in this period, on the table's time axis: ${PERIODS}.`),
213
+ filters: z
214
+ .array(z.record(z.unknown()))
215
+ .optional()
216
+ .describe("Extra conditions, in the same shape a measure's filters take."),
217
+ }, async (body) => guard(async () => jsonResult(await client.post(`${MEASURES}/rows`, body))));
218
+ }
219
+ export function registerDashboardTools(server, client) {
220
+ server.tool("duplicate_dashboard", "Make a copy of a dashboard, owned by you. The copy starts as a separate " +
221
+ "dashboard: changing it does not touch the original.", {
222
+ id: z.string().describe("The dashboard to copy."),
223
+ name: z
224
+ .string()
225
+ .optional()
226
+ .describe("The copy's name. Omit for the platform's default."),
227
+ }, async ({ id, name }) => guard(async () => jsonResult(await client.post(`/api/v1/dashboards/${id}/duplicate`, name ? { name } : {}))));
228
+ }
229
+ //# sourceMappingURL=dataSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../src/tools/dataSources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;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AAE;aACV,QAAQ,CAAC,+DAA+D,CAAC;KAC7E,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,0EAA0E;QACxE,qDAAqD,EACvD;QACE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACjD,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,mDAAmD,CAAC;KACjE,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CACrB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CACR,MAAM,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC9E,CACF,CACJ,CAAC;AACJ,CAAC"}
@@ -27,9 +27,25 @@ export function registerPersonaTools(server, client) {
27
27
  // used to be hand-written here. Only the agent-scoped create/read above are
28
28
  // bespoke, because personas have no standalone create route.
29
29
  }
30
+ /**
31
+ * The shape `implementation` must have for a connector to run.
32
+ *
33
+ * An author wrote `headers` as an object instead of a list of entries; it saved
34
+ * and then crashed at execution with an error that pointed at the network (#78).
35
+ * The platform is getting a save-time check for it, but the description is
36
+ * where an agent learns the shape BEFORE its first attempt, so it says it.
37
+ */
38
+ const CONNECTOR_SHAPE = "\n\nSHAPE OF `implementation` — `headers` and `queryParams` are LISTS of " +
39
+ '`{ "key": "…", "value": "…", "enabled": true }`, never an object like ' +
40
+ '`{ "Accept": "application/json" }`. `body` is ' +
41
+ '`{ "type": "json" | "form" | "none", "content": "<the raw payload as a ' +
42
+ 'string>" }`. Use `{{name}}` in a value to fill it from the tool\'s input. ' +
43
+ "Any other shape cannot run: the connector saves and then fails when " +
44
+ "called, with an error that does not point here.";
30
45
  export function registerConnectorTools(server, client) {
31
46
  server.tool("create_connector", "Create a connector draft (a tool of type 'connector'). Do NOT put real " +
32
- "credentials in authConfig — use placeholders; a human fills secrets in Axonity.", {
47
+ "credentials in authConfig — use placeholders; a human fills secrets in Axonity." +
48
+ CONNECTOR_SHAPE, {
33
49
  fields: z
34
50
  .record(z.unknown())
35
51
  .describe("Connector fields (name, description, implementation, authConfig)."),
@@ -38,7 +54,8 @@ export function registerConnectorTools(server, client) {
38
54
  return jsonResult(await client.post("/api/v1/tools", { type: "connector", ...fields }));
39
55
  }));
40
56
  server.tool("update_connector", "Update a connector draft (a tool of type 'connector'). Read it first for its " +
41
- "version; keep authConfig as placeholders only.", {
57
+ "version; keep authConfig as placeholders only." +
58
+ CONNECTOR_SHAPE, {
42
59
  id: z.string().describe("The connector (tool) id."),
43
60
  expectedVersion: z.number().int().describe("Version last read — 409 if stale."),
44
61
  fields: z.record(z.unknown()).describe("Fields to change (camelCase)."),
@@ -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,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,8EAA8E;QAC5E,sCAAsC,EACxC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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E,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,CAAC,CAAC,CAChE,CACJ,CAAC;AACJ,CAAC"}
@@ -144,5 +144,12 @@ export interface EntityDef {
144
144
  * is not acceptable unlabelled, so the entity that has one says so here.
145
145
  */
146
146
  updateWarning?: string;
147
+ /**
148
+ * Appended to `create_<entity>`'s description when creating one takes more
149
+ * than "pass its fields" — a value to look up first, or a permission the
150
+ * caller may not have. A data source is the case that asked for it: its
151
+ * `config` keys come from the driver, and a guessed key is a 422.
152
+ */
153
+ createNote?: string;
147
154
  }
148
155
  export declare function registerEntityTools(server: McpServer, client: AxonityClient, def: EntityDef): void;
@@ -97,7 +97,8 @@ export function registerEntityTools(server, client, def) {
97
97
  if (creatable) {
98
98
  server.tool(`create_${singular}`, `Create a new ${singular} draft. Pass the entity's fields (camelCase) in ` +
99
99
  `\`fields\`; the backend validates them. Returns the created ${singular} ` +
100
- `with its id and version.`, {
100
+ `with its id and version.` +
101
+ (def.createNote ? `\n\n${def.createNote}` : ""), {
101
102
  fields: z
102
103
  .record(z.unknown())
103
104
  .describe(`The ${singular}'s fields as a JSON object (camelCase keys), e.g. ` +
@@ -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;AA8H9E,MAAM,UAAU,mBAAmB,CACjC,MAAiB,EACjB,MAAqB,EACrB,GAAc;IAEd,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,G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,kBAAkB,QAAQ,+CAA+C;QACvE,sEAAsE;QACtE,wCAAwC,EAC1C;QACE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,QAAQ,QAAQ,CAAC;QAChD,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,wDAAwD,CAAC;KACtE,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAC9B,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CACR,MAAM,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE;QAC7C,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,EAAE;QACZ,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CACH,CACF,CACJ,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axonity-ai/mcp",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Model Context Protocol server for Axonity Flow — lets an external agent (e.g. Claude Code) read, draft, and update workflows, agents and tools in an Axonity tenant.",
5
5
  "license": "MIT",
6
6
  "repository": {