@axonity-ai/mcp 0.7.0 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/tools/company.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,cAAc,EACd,6EAA6E;QAC3E,2EAA2E;QAC3E,iCAAiC,EACnC,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAC/E,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,wBAAwB,EACxB,+EAA+E;QAC7E,qFAAqF,EACvF,EAAE,EACF,KAAK,IAAI,EAAE,CACT,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAC/E,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,6EAA6E;QAC3E,8EAA8E;QAC9E,2EAA2E;QAC3E,mDAAmD,EACrD;QACE,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,CAAC,yDAAyD,CAAC;QACtE,QAAQ,EAAE,CAAC;aACR,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aACnB,QAAQ,CAAC,wEAAwE,CAAC;KACtF,EACD,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,CACtC,KAAK,CAAC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D,EACpD;QACE,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,CAAC,6CAA6C,CAAC;QAC1D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KAClF,EACD,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,CAC/B,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CACR,MAAM,MAAM,CAAC,KAAK,CAAC,kCAAkC,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAC/E,CACF,CACJ,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,yBAAyB,EACzB,6EAA6E;QAC3E,4EAA4E;QAC5E,4EAA4E;QAC5E,0EAA0E;QAC1E,yEAAyE;QACzE,QAAQ,EACV;QACE,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,wDAAwD,CAAC;KACtE,EACD,KAAK,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAC1B,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CACR,MAAM,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE;QAC7C,UAAU,EAAE,SAAS;QACrB,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CACH,CACF,CACJ,CAAC;AACJ,CAAC"}
@@ -257,6 +257,9 @@ made any time before you attach them.
257
257
  use rather than inventing one.
258
258
  - Complete check: the tool has the I/O schemas its callers need AND a non-empty
259
259
  implementation of the right shape for its type.
260
+ - \`toolboxId\` files the tool in a toolbox on creation. Read \`list_toolboxes\`
261
+ BEFORE you create: a tool made without one is ungrouped, which is valid and
262
+ is also how nobody finds it. See Toolboxes below.
260
263
 
261
264
  ### agent (\`create_agent\`, strict body)
262
265
  - Required: \`name\`. Enumerated fields, with their ONLY valid values:
@@ -321,6 +324,12 @@ made any time before you attach them.
321
324
  \`update_flow\` write draft state; runtime uses \`read_flow_published\` until
322
325
  approval. \`request_publish_flow\` to publish, \`discard_flow_draft\` to reset.
323
326
 
327
+ ### data_table
328
+ - An authored table of rows: the tenant's own reference data, designed and
329
+ maintained by a person, read by agents and decisions. Same lifecycle as an
330
+ output schema — draft, version, request publish. See "Tables" below, which is
331
+ where the rules that are NOT the generic ones live.
332
+
324
333
  ### company
325
334
  - The tenant's single company document (mission, value streams, org structure).
326
335
  A SINGLETON — one per tenant, no id, so there is no list/create/delete:
@@ -515,6 +524,18 @@ the new tenant too, and a human fills the real value there.
515
524
  - An unknown or misspelled key is a 422 naming it, not a silent drop — so
516
525
  spelling matters and you are told when it is wrong.
517
526
 
527
+ ## Inputs and constants — the two lists that belong to the PROCESS
528
+ A workflow declares two whole-list things of its own, both edited the same way
529
+ (read the list, change it, write it back — there is no per-entry command,
530
+ because the identity is the \`name\` and renaming is the common edit):
531
+ - \`set_workflow_inputs\` — what the process NEEDS to start. Carried by every
532
+ start, and the list a caller fills in whichever trigger fired. A start's own
533
+ \`parameters\` are what that start declares on top; where a name is in both,
534
+ the process-level one wins.
535
+ - \`set_workflow_constants\` — what the AUTHOR pins, described below.
536
+ Read both back with \`read_workflow_trigger_parameters\`, which answers
537
+ \`{ inputs, triggers, constants }\`.
538
+
518
539
  ## Constants — values the AUTHOR owns
519
540
  A constant is applied on EVERY run whichever trigger fired, and it OVERWRITES
520
541
  whatever a caller sent. That is deliberate: a field the operator's form does not
@@ -587,24 +608,71 @@ a document to find out what the platform did.
587
608
  - Trigger deletes are HARD deletes — no restore. Webhook tokens are shown once
588
609
  at create/rotate and are never retrievable; hand them straight to your human
589
610
  and never store one in an entity field.
611
+ - **A schedule is a claim — check it.** \`run_cron_schedule_now\` fires one
612
+ immediately without moving \`nextFireAt\`, so you can prove a schedule starts
613
+ something instead of waiting until tomorrow to find out it does not. It runs
614
+ for real, with real cost and side effects.
615
+ - **To PAUSE a schedule, disarm it** (\`set_cron_schedule_enabled\`), never
616
+ delete it. Deleting throws away the rules the author wrote and makes "stop
617
+ this for a week" indistinguishable from "we do not do this any more".
618
+ - \`create_cron_schedule\` takes EITHER \`cronExpr\` OR \`rules\`, and the
619
+ trigger must exist in the PUBLISHED document. For the rule shapes, read
620
+ \`scheduleRuleKinds\` from \`get_workflow_authoring_spec\` — do not invent one.
621
+ - \`list_all_cron_schedules\` answers "what runs tonight?" across the tenant;
622
+ \`reconcile_cron_schedules\` answers "is that actually what runs?". The second
623
+ reports rather than tidying silently and never arms something switched off.
590
624
 
591
625
  ## Evaluating what you built
592
626
  - There is no findings endpoint and no evaluator entity. To judge a run, read it:
593
627
  \`read_run\` (its \`validatorVerdicts\` and \`agentInvocations\`) and
594
628
  \`read_run_trace\` (the step-by-step tool calls).
629
+ - **Start with \`read_run_outline\`, not \`read_run\`.** The outline is the run's
630
+ table of contents and carries no bodies, so it costs what the run's SHAPE
631
+ costs rather than its content — a fan-out over four thousand items reads about
632
+ as cheaply as one over four. Then open only what you need:
633
+ \`read_run_value\` for one large step value (by the digest in \`stepStates\`),
634
+ \`read_run_invocation_messages\` for one agent's transcript (by the id in
635
+ \`agentInvocations\`). Reading a whole run to find one message is the habit
636
+ this replaces.
637
+ - \`itemCap\` on the outline bounds items listed per fan-out step; the remainder
638
+ is counted in \`counts.truncated\`, never dropped in silence.
639
+ - **What an agent wrote to itself is readable.** \`list_run_session_memory\`
640
+ lists the files an agent left during a run (metadata only) and
641
+ \`read_run_session_memory_file\` opens one. When the trace shows a decision but
642
+ not what it was reading, this is usually where the reason is. Workflow-bound
643
+ reference material is NOT here — that lives in \`reference_docs\`.
644
+ - **\`list_todo_steps\`** is every step in the tenant waiting on a human, across
645
+ all runs; \`read_run_waiting_on\` is the same question for one run you already
646
+ have. It is PAGED over the waiting RUNS, so \`items\` can be longer than
647
+ \`pageSize\` — one run may park several steps. Follow \`nextCursor\` until it
648
+ is null before concluding anything about how much is waiting.
595
649
  - Runs are the only thing with a real archive state — \`archive_run\` is
596
650
  reversible, \`bulk_delete_runs\` is not.
597
651
 
598
652
  ## Subworkflows — one workflow calling another
599
653
  Both halves live in the workflow DOCUMENT, so both are ordinary
600
654
  \`apply_workflow_mutations\` work. There is no separate "link" route.
601
- - **To make a workflow callable**, give it a trigger with
602
- \`typeId: "subprocess-invocation"\` (\`add_trigger\`) whose \`parameters\` are
603
- what a caller must pass. That list IS the signature — there is no other place
604
- to declare it. \`parameters\` goes in the \`add_trigger\` call itself; you do
605
- not need a follow-up \`update_trigger\`. For what a parameter may contain, ask
606
- \`get_workflow_authoring_spec\` for \`add_trigger\`'s payload schema rather
607
- than a shape written down here.
655
+ - **To make a workflow callable**, it needs TWO things: a trigger with
656
+ \`typeId: "subprocess-invocation"\` (\`add_trigger\`), which is what makes it
657
+ callable at all, and a declared SIGNATURE.
658
+ - **The signature belongs to the PROCESS, not to the trigger.** Declare it with
659
+ \`set_workflow_inputs\` — one list, carried by every start, and the same list
660
+ a caller of any kind fills in. A trigger's own \`parameters\` are what THAT
661
+ start declares on top; \`parameters\` goes in the \`add_trigger\` call itself,
662
+ so a start that does add fields needs no follow-up \`update_trigger\`.
663
+ - Older documents declared everything on the invocation trigger instead, and
664
+ that still works: both are read, and where a name appears in both the
665
+ PROCESS-level one wins. When you are editing a workflow you did not author,
666
+ read \`read_workflow_trigger_parameters\` and see which list actually holds
667
+ its fields before adding to either.
668
+ - \`set_workflow_inputs\` REPLACES the whole list, like
669
+ \`set_workflow_constants\`: read, edit, write back. An entry with no \`name\`
670
+ is refused rather than stored — the name is how a caller passes the value and
671
+ how the run payload keys it, so a nameless one would be skipped silently at
672
+ run time.
673
+ - For what an input or a parameter may contain, ask
674
+ \`get_workflow_authoring_spec\` for the payload schema of the command you are
675
+ about to write, rather than a shape written down here.
608
676
  - **It must also be PUBLISHED.** The catalogue reads the published document, so
609
677
  a draft-only workflow comes back \`callable: false\` with "Never published".
610
678
  Authoring the caller first and publishing the callee later is a run-time
@@ -652,9 +720,127 @@ Both halves live in the workflow DOCUMENT, so both are ordinary
652
720
  \`metadataRedacted\`. If you need one of those values, a human reads it in
653
721
  Axonity — do not try another route to it.
654
722
 
723
+ ## Tables — the tenant's own reference data
724
+ A table is an authored library element that HOLDS ROWS: the pricing bands, the
725
+ region-to-owner map, the list of accepted reason codes. A person designs the
726
+ columns and maintains the content; agents and decisions read it.
727
+
728
+ **When a table is the right element.** Reach for one when the CONTENT is the
729
+ point and it changes without the process changing.
730
+ - Not an \`output_schema\`: that describes a SHAPE and holds no data. If you
731
+ find yourself putting example values in a schema, you wanted a table.
732
+ - Not a workflow constant: a constant belongs to ONE workflow and is edited in
733
+ its document. A table is shared, and three workflows reading the same rows is
734
+ the case it exists for.
735
+ - Not a function tool with a list inside it: that makes changing a row an act of
736
+ editing code, reviewing it and publishing a tool. A business user maintains a
737
+ table; nobody should need you to change a postcode.
738
+
739
+ **Static or dynamic — who owns the rows.**
740
+ - \`isDynamic: false\` (the default) is reference data the AUTHOR maintains. A
741
+ workflow reads it and cannot change it. \`allowedOperations\` must be empty:
742
+ a permission nothing honours is refused, not stored.
743
+ - \`isDynamic: true\` lets a workflow change the rows, limited to
744
+ \`allowedOperations\` — any of \`add\` / \`update\` / \`delete\`. READING IS
745
+ NEVER LISTED there: it is what a table is for and is always allowed.
746
+ - You edit rows through \`add_data_table_row\` / \`update_data_table_row\` /
747
+ \`delete_data_table_row\` whatever the table's mode says — those grants are
748
+ about what a RUN may do, not about authoring.
749
+
750
+ **Never put rows in \`update_data_table\`.** \`rows\` and \`columns\` are
751
+ whole-collection fields: sending one row REPLACES the table's content and
752
+ deletes everything else. The row tools address a single row by a match
753
+ (\`matchColumn\`/\`matchValue\`) and cannot touch the rest — use them. Reach for
754
+ \`update_data_table({ fields: { rows } })\` only when you genuinely mean to
755
+ replace the whole content, and never as a way to append.
756
+
757
+ **The rule that bites hardest: derived tools follow the PUBLISHED table.** A
758
+ published table mints its own CRUD tools, so granting an agent access to one is
759
+ ordinary tool granting — take a \`toolId\` from \`list_data_table_tools\` and put
760
+ it in the agent's \`toolIds\`. But those tools follow the table's PUBLISHED
761
+ version. An author who ticked "may add rows" and has not published has granted
762
+ nothing, and the tool that would let a run act on it does not exist yet.
763
+ \`list_data_table_tools\` reports \`offered\` (what the draft would yield),
764
+ \`toolId\` (whether a row exists) and \`isLive\` (whether a run can reach it)
765
+ separately for exactly this reason. Read all three before concluding a grant
766
+ landed. Same rule as everywhere else here — a draft changes nothing until it is
767
+ published — and it is the first thing an agent gets wrong about tables.
768
+
769
+ **Routing a decision on a table.** A decision can branch by looking a value up
770
+ in one column and taking the branch named in another, with
771
+ \`builtin: "evaluators.table_lookup"\`. The behaviour worth knowing, because no
772
+ catalogue states it: THE CELL'S VALUE IS THE BRANCH'S OUTCOME KEY — not a new
773
+ field, and not something you map afterwards. Every value in the result column
774
+ must be the outcome key of an outgoing branch, or publishing the workflow is
775
+ refused. The table must be PUBLISHED: a run reads the published snapshot, so a
776
+ table that is only saved routes nothing. For the argument names it reads, and
777
+ for every other selectable evaluator, read \`decisionEvaluators\` from
778
+ \`get_workflow_authoring_spec\` — generated from the registry that dispatches
779
+ them, so it cannot advertise one the platform would not run.
780
+
781
+ **Column kinds** come from the same place: \`tableColumnKinds\` in
782
+ \`get_workflow_authoring_spec\`. It is a FOURTH vocabulary beside the three for
783
+ parameters, outputs and schema fields, with its own spellings — do not carry a
784
+ value across from one of the others, and do not guess. Every column needs a
785
+ \`description\`: an agent reads it to know what the column is for, and a save
786
+ without one is refused.
787
+
788
+ **\`list_data_tables\` is PAGED**, alone among the library lists — a tenant's
789
+ reference data has no ceiling. Page one is not the library. Follow
790
+ \`nextCursor\` while \`hasMore\` is true, or better, narrow in the query:
791
+ \`name\` is exact and unique per workspace, so "does one called X already
792
+ exist" is a single call rather than a walk. The page carries \`rowCount\`, never
793
+ the rows; the rows come from \`read_data_table\`.
794
+
795
+ ## Toolboxes — where a tool is filed
796
+ - A toolbox is a per-tenant grouping label over tools. Read \`list_toolboxes\`
797
+ before \`create_tool\` and pass the box's id as \`toolboxId\`; a tool created
798
+ without one is ungrouped. Move an existing tool with
799
+ \`assign_tool_toolbox\` (\`toolboxId: null\` takes it out of its box).
800
+ - \`set_toolbox_tools\` DECLARES the membership — it does not add to it. A tool
801
+ in the box and absent from your list is evicted. To add one tool, read the
802
+ box's contents first, or use \`assign_tool_toolbox\`, which cannot evict
803
+ anything by accident. A tool is in at most one box.
804
+ - A toolbox NEVER changes what an agent may call. An agent is linked to
805
+ individual tools (\`agent.toolIds\`), never to a box; there is no route that
806
+ grants a whole box, and "give this agent the Carerix toolbox" is a bulk write
807
+ of individual links. What the box decides is how a tool is ADVERTISED: a boxed
808
+ tool with \`surfacing: "inherit"\` is found via discover_tools instead of
809
+ riding in every prompt. Read \`effectiveSurfacing\` on the tool to answer "is
810
+ it in the prompt?"; \`surfacing\` is the raw stored choice.
811
+ - Deleting a toolbox does NOT delete its tools — they survive, ungrouped. The
812
+ box itself has no restore.
813
+ - Platform-shipped tools cannot be moved. The \`Axonity\`, \`Checks\` and
814
+ \`Branching\` boxes hold locked tools; the API refuses and NAMES the tool it
815
+ refused. Read that name to your human instead of bisecting the selection.
816
+ - \`set_toolbox_auth\` sets the credential a box's tools SHARE — ten Microsoft
817
+ Mail tools, one mailbox, said once. A tool with its own auth keeps it; only a
818
+ tool with none inherits. Same rule as anywhere else: point \`secretId\` at a
819
+ stored secret, never a real value. Before you clear or replace it, or delete
820
+ the box, call \`list_toolbox_dependent_tools\` — it names the tools that would
821
+ start failing at run time with a bare 401.
822
+
655
823
  ## Tenant
656
824
  - Your token fixes the tenant. You cannot act across tenants; never send a
657
825
  tenant id in a body.
826
+ - \`read_model_tier_map\` says what \`capabilityTier\` actually RESOLVES TO on
827
+ this tenant. The tier is the field you write; the model is what you are
828
+ choosing. Read it before you pick one.
829
+ - When a run does not start, look outward before blaming the workflow:
830
+ \`read_concurrency_status\` (is the tenant at its cap?),
831
+ \`read_queue_overview\` (is dispatch alive?), \`list_task_queue\` (did
832
+ something fail in the layer beneath the run?). \`read_for_each_rate\` explains
833
+ a fan-out that is pacing itself rather than stalling.
834
+ - You can READ those and not change them. Caps, rate ceilings and the tier map
835
+ are operator decisions — report what you found, and to whom, rather than
836
+ looking for another route to it.
837
+ - \`read_deploy_contract\` says what THIS deploy speaks: build, environment and
838
+ the routes it mounts. Read it when a call fails in a way that suggests the
839
+ backend is older or newer than you expect.
840
+ - \`list_users\` is where an \`ownerId\` comes from. Look one up instead of
841
+ asking a human to copy it out of the UI.
842
+ - \`list_audit_events({ actorKind: "service_token" })\` reads back what external
843
+ agents — including you — actually changed.
658
844
  `;
659
845
  export function registerConventions(server) {
660
846
  server.tool("axonity_conventions", "Read the authoring conventions BEFORE creating or updating anything: the " +
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4yBnB,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,2EAA2E;QACzE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,uEAAuE;QACvE,kBAAkB,EACpB,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAC1E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The parts of a table that are NOT the generic entity family (axonity-mcp#63).
3
+ *
4
+ * A table is an authored, typed, versioned library element that holds ROWS
5
+ * (axonity-flow#1217), and its routes were deliberately written in the same
6
+ * order and spelling as an output schema's — so list/read/create/update/delete/
7
+ * restore/discard-draft/request-publish and the whole eleven-route version
8
+ * family come from `registerEntityTools` and `registerVersionTools` with no code
9
+ * here. Two things do not fit that shape, and both are here:
10
+ *
11
+ * **1. Row writes.** `PUT /data-tables/{id}` replaces the WHOLE `rows` array.
12
+ * `update_data_table` takes a blind `fields` bag by design — the connector stays
13
+ * thin and the backend validates — which means an agent that passes `rows`
14
+ * meaning "add this one" silently destroys the table's content. That is a
15
+ * destructive default reachable by accident, so the three row routes
16
+ * axonity-flow#1235 added get explicit tools that address ONE row and cannot
17
+ * touch the others. `update_data_table` carries the warning as well
18
+ * (`updateWarning` on its `EntityDef`); the tools are what make the warning
19
+ * actionable rather than merely a caution.
20
+ *
21
+ * The row tools take no `expectedVersion`. That is the backend's contract, not
22
+ * an omission: a row write is a single addressed operation the service applies
23
+ * under its own lock, and it RETURNS the table's new `version` for a later
24
+ * `update_data_table` to base itself on. Adding a version argument here would
25
+ * invent a check the route does not make.
26
+ *
27
+ * **2. Which tools a table yields.** A published table mints its own CRUD tools,
28
+ * so granting an agent access to a table is ordinary tool granting rather than a
29
+ * second permission vocabulary. Their names follow a convention, which used to
30
+ * mean the only way to find them was to fetch the whole tool library and match
31
+ * on it. `list_data_table_tools` asks the table instead — and, crucially,
32
+ * reports the operations that are OFFERED but not yet LIVE, which is the answer
33
+ * to the first thing an author gets wrong: a table's tools follow its PUBLISHED
34
+ * version, so ticking "may add rows" and not publishing has granted nothing.
35
+ */
36
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
37
+ import type { AxonityClient } from "../client.js";
38
+ export declare function registerDataTableTools(server: McpServer, client: AxonityClient): void;
@@ -0,0 +1,129 @@
1
+ /**
2
+ * The parts of a table that are NOT the generic entity family (axonity-mcp#63).
3
+ *
4
+ * A table is an authored, typed, versioned library element that holds ROWS
5
+ * (axonity-flow#1217), and its routes were deliberately written in the same
6
+ * order and spelling as an output schema's — so list/read/create/update/delete/
7
+ * restore/discard-draft/request-publish and the whole eleven-route version
8
+ * family come from `registerEntityTools` and `registerVersionTools` with no code
9
+ * here. Two things do not fit that shape, and both are here:
10
+ *
11
+ * **1. Row writes.** `PUT /data-tables/{id}` replaces the WHOLE `rows` array.
12
+ * `update_data_table` takes a blind `fields` bag by design — the connector stays
13
+ * thin and the backend validates — which means an agent that passes `rows`
14
+ * meaning "add this one" silently destroys the table's content. That is a
15
+ * destructive default reachable by accident, so the three row routes
16
+ * axonity-flow#1235 added get explicit tools that address ONE row and cannot
17
+ * touch the others. `update_data_table` carries the warning as well
18
+ * (`updateWarning` on its `EntityDef`); the tools are what make the warning
19
+ * actionable rather than merely a caution.
20
+ *
21
+ * The row tools take no `expectedVersion`. That is the backend's contract, not
22
+ * an omission: a row write is a single addressed operation the service applies
23
+ * under its own lock, and it RETURNS the table's new `version` for a later
24
+ * `update_data_table` to base itself on. Adding a version argument here would
25
+ * invent a check the route does not make.
26
+ *
27
+ * **2. Which tools a table yields.** A published table mints its own CRUD tools,
28
+ * so granting an agent access to a table is ordinary tool granting rather than a
29
+ * second permission vocabulary. Their names follow a convention, which used to
30
+ * mean the only way to find them was to fetch the whole tool library and match
31
+ * on it. `list_data_table_tools` asks the table instead — and, crucially,
32
+ * reports the operations that are OFFERED but not yet LIVE, which is the answer
33
+ * to the first thing an author gets wrong: a table's tools follow its PUBLISHED
34
+ * version, so ticking "may add rows" and not publishing has granted nothing.
35
+ */
36
+ import { z } from "zod";
37
+ import { guard, jsonResult } from "./result.js";
38
+ const BASE = "/api/v1/data-tables";
39
+ /**
40
+ * How the two addressed row writes name their row.
41
+ *
42
+ * Deliberately a MATCH rather than a row index: a table's rows have no stable
43
+ * position, so "row 4" is a different row after anyone inserts one. The backend
44
+ * refuses a match that hits zero rows (404) or more than one (with the count)
45
+ * rather than guessing, which is what makes this safe to hand an agent.
46
+ */
47
+ const MATCH = {
48
+ matchColumn: z
49
+ .string()
50
+ .describe("The column that identifies the row. It must match EXACTLY ONE row: " +
51
+ "zero is a 404 and more than one is refused with the count, so a write " +
52
+ "never lands on a row you did not mean. Pick a column whose values are " +
53
+ "unique — read the table first if you are not sure."),
54
+ matchValue: z
55
+ .string()
56
+ .describe("The value that column must hold. Compared the way a decision compares " +
57
+ 'it over the same table, so "5000" finds the number 5000 and ' +
58
+ '"benelux" finds the cell holding "Benelux".'),
59
+ };
60
+ export function registerDataTableTools(server, client) {
61
+ server.tool("add_data_table_row", "Append ONE row to a table, without resending the rows already there. " +
62
+ "\n\nUSE THIS RATHER THAN update_data_table TO ADD A ROW. `rows` on " +
63
+ "update_data_table is a whole-collection field: sending one row there " +
64
+ "replaces the table's entire content. This appends, and cannot touch the " +
65
+ "other rows. " +
66
+ "\n\nA key that is not a column is REFUSED and named — never dropped, " +
67
+ "because a silently discarded value is a lost value. Read the table first " +
68
+ "for its column names and what each one means. " +
69
+ "\n\nThe response carries the table's new `version`: base a later " +
70
+ "update_data_table on that number rather than re-reading. " +
71
+ "\n\nThis writes the DRAFT. A run reads the published table, so the row " +
72
+ "is not live until the table is published (request_publish_data_table).", {
73
+ id: z.string().describe("The table's id."),
74
+ values: z
75
+ .record(z.unknown())
76
+ .describe("The row's values, keyed by COLUMN NAME (the column's `name`, not " +
77
+ "its label). Required columns must be present."),
78
+ }, async ({ id, values }) => guard(async () => jsonResult(await client.post(`${BASE}/${id}/rows`, { values }))));
79
+ server.tool("update_data_table_row", "Change named columns on the ONE row a match addresses. Columns you do not " +
80
+ "name keep their values, so this is a partial edit of a row rather than a " +
81
+ "replacement of it. " +
82
+ "\n\nUSE THIS RATHER THAN update_data_table TO EDIT A ROW — `rows` there " +
83
+ "replaces the whole content. " +
84
+ "\n\nAn empty `changes` is refused: an update that changes nothing is a " +
85
+ "mistake dressed as a success. The response reports `changed` — which " +
86
+ "columns actually moved — plus the table's new `version`. " +
87
+ "\n\nThis writes the DRAFT; publish before a run can see it.", {
88
+ id: z.string().describe("The table's id."),
89
+ ...MATCH,
90
+ changes: z
91
+ .record(z.unknown())
92
+ .describe("The columns to change and what to change them to, keyed by column " +
93
+ "name. Columns not named here keep their values. Must not be empty."),
94
+ }, async ({ id, matchColumn, matchValue, changes }) => guard(async () => jsonResult(await client.patch(`${BASE}/${id}/rows`, { changes }, { match_column: matchColumn, match_value: matchValue }))));
95
+ server.tool("delete_data_table_row", "Remove the ONE row a match addresses. " +
96
+ "\n\nTHE REMOVED ROW RIDES BACK IN THE RESPONSE, on purpose: after this " +
97
+ "call it is the only copy left, so an operator who deleted the wrong one " +
98
+ "can put it back with add_data_table_row. Keep it. " +
99
+ "\n\nUnlike delete_data_table this is NOT soft-deleted and there is no " +
100
+ "restore_*: the row is gone from the draft. The published table still has " +
101
+ "it until the table is published again, which is the only undo. " +
102
+ "\n\nThe response also carries the table's new `version` and `total`.", {
103
+ id: z.string().describe("The table's id."),
104
+ ...MATCH,
105
+ confirm: z
106
+ .literal(true)
107
+ .describe("Must be true. Acknowledges you understand this removes a row from " +
108
+ "the draft and that only the response carries it afterwards."),
109
+ }, async ({ id, matchColumn, matchValue }) => guard(async () => jsonResult(await client.del(`${BASE}/${id}/rows`, {
110
+ match_column: matchColumn,
111
+ match_value: matchValue,
112
+ }))));
113
+ server.tool("list_data_table_tools", "Which tools this table yields, and which of them a RUN can actually " +
114
+ "reach. Read-only. " +
115
+ "\n\nA published table mints its own CRUD tools, so giving an agent " +
116
+ "access to a table is ordinary tool granting — put a `toolId` from here " +
117
+ "in the agent's `toolIds`. Their names follow a convention, so the " +
118
+ "alternative is fetching the whole tool library and matching on it. " +
119
+ "\n\nREAD THE THREE FLAGS SEPARATELY — collapsing them is how \"I ticked " +
120
+ "'may add rows' and there is no tool\" becomes a mystery: " +
121
+ "`offered` is what the current DRAFT would yield (what the author " +
122
+ "decided), `toolId` is whether a tool row exists today (what a grant " +
123
+ "names), and `isLive` is whether that row is PUBLISHED (what a run can " +
124
+ "reach). A table's tools follow its published version, so a grant that " +
125
+ "has been saved and not published has granted nothing yet. " +
126
+ "\n\n`publishedMajorVersion: null` means the table has never been " +
127
+ "published and nothing here is live.", { id: z.string().describe("The table's id.") }, async ({ id }) => guard(async () => jsonResult(await client.get(`${BASE}/${id}/tools`))));
128
+ }
129
+ //# sourceMappingURL=dataTables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataTables.js","sourceRoot":"","sources":["../../src/tools/dataTables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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AM,CAAC,IAAI,CACT,uBAAuB,EACvB,sEAAsE;QACpE,oBAAoB;QACpB,qEAAqE;QACrE,yEAAyE;QACzE,oEAAoE;QACpE,qEAAqE;QACrE,0EAA0E;QAC1E,2DAA2D;QAC3D,mEAAmE;QACnE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,4DAA4D;QAC5D,mEAAmE;QACnE,qCAAqC,EACvC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,EAC9C,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CACf,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC"}
@@ -143,9 +143,14 @@ export function registerAttachTools(server, client) {
143
143
  // `detached: true` and not one link had ever existed.
144
144
  link("skill", "workflow", (workflowId, skillId) => `/api/v1/workflows/${workflowId}/skills-v2/${skillId}`, "workflowId", "skillId", "list_workflow_skills");
145
145
  link("policy", "agent", (agentId, policyId) => `/api/v1/agents/${agentId}/policies/${policyId}`, "agentId", "policyId", "list_agent_policies");
146
- // Reference docs attach to agents only — there is no workflow-scoped
147
- // reference-doc route on the backend, so no `*_to_workflow` pair here.
148
146
  link("reference", "agent", (agentId, refId) => `/api/v1/agents/${agentId}/reference-docs/${refId}`, "agentId", "refId", "list_agent_reference_docs");
147
+ // Reference docs used to attach to agents ONLY, and this file said so. That
148
+ // is no longer true: axonity-flow#1061 gave them the workflow-scoped trio,
149
+ // mirroring `workflow_skills_router` exactly. Until then the process panel
150
+ // "attached" a doc by rewriting its `scope`, which the runtime ignores — a
151
+ // link nothing read, which is the same failure the skill read-back exists to
152
+ // make visible.
153
+ link("reference", "workflow", (workflowId, refId) => `/api/v1/workflows/${workflowId}/reference-docs/${refId}`, "workflowId", "refId", "list_workflow_reference_docs");
149
154
  /**
150
155
  * The read side of the links above. `attach_*`/`detach_*` write a link but
151
156
  * return nothing you can list later, so these are how an agent verifies a
@@ -196,33 +201,52 @@ export function registerAttachTools(server, client) {
196
201
  listLinks("policy", "policies", (id) => `/api/v1/agents/${id}/policies`, "policies");
197
202
  listLinks("reference_doc", "reference_docs", (id) => `/api/v1/agents/${id}/reference-docs`, "references");
198
203
  /**
199
- * The workflow-scoped read-back (axonity-flow#961 S8).
204
+ * The workflow-scoped read-backs (axonity-flow#961 S8, #1061).
200
205
  *
201
206
  * Deliberately without `linkSource`: unlike the agent view there is only one
202
- * way a skill reaches a workflow — an explicit link — so a field that always
203
- * says the same thing would train a reader to skip it. Live links only, for
204
- * the reason `list_agent_skills` gives: detaching closes the interval rather
205
- * than deleting the row, and a stale dependency list is worse than none.
207
+ * way a skill or a doc reaches a workflow — an explicit link — so a field
208
+ * that always says the same thing would train a reader to skip it. Live
209
+ * links only, for the reason `list_agent_skills` gives: detaching closes the
210
+ * interval rather than deleting the row, and a stale dependency list is
211
+ * worse than none.
206
212
  */
207
- server.tool("list_workflow_skills", "List the skills currently scoped to a WORKFLOW — the read-back for " +
208
- "attach_skill_to_workflow. A 200 from an attach does not prove the link " +
209
- "resolved, and the link lives outside the workflow document, so " +
210
- "read_workflow will never show it: this is the only way to tell an attach " +
211
- "that landed from one that silently did nothing. Read-only. " +
212
- "\n\nReturns IDENTITY by default; pass verbosity: \"full\" for whole " +
213
- "bodies, which a skill's playbook makes expensive.", {
214
- workflowId: z.string().describe("The workflow's id."),
215
- verbosity: z
216
- .enum(["identity", "full"])
217
- .optional()
218
- .describe('How much of each row to return. "identity" (default) is id, name, ' +
219
- 'description and status. "full" is the entire skill, body included.'),
220
- }, async ({ workflowId, verbosity }) => guard(async () => {
221
- const response = await client.get(`/api/v1/workflows/${workflowId}/skills-v2`);
222
- if (verbosity === "full")
223
- return jsonResult(response);
224
- return jsonResult(projectLinkRows(response, "skills"));
225
- }));
213
+ const listWorkflowLinks = (subject, plural, path,
214
+ /** The key the backend nests the rows under (`skills` / `references`). */
215
+ rowsKey,
216
+ /** Why "full" is expensive for this subject. */
217
+ fullCost,
218
+ /**
219
+ * The noun the attach/detach pair is named with. It is NOT always the
220
+ * subject: the doc link is `attach_reference_to_workflow` while the
221
+ * read-back is `list_workflow_reference_docs`, an asymmetry inherited from
222
+ * the agent-scoped pair and kept so both halves of a family are spelled the
223
+ * same way. Pointing at the wrong name is worse than not pointing at all.
224
+ */
225
+ attachNoun) => {
226
+ server.tool(`list_workflow_${plural}`, `List the ${plural.replace("_", " ")} currently scoped to a WORKFLOW — ` +
227
+ `the read-back for attach_${attachNoun}_to_workflow. A 200 from an attach ` +
228
+ `does not prove the link resolved, and the link lives outside the ` +
229
+ `workflow document, so read_workflow will never show it: this is the ` +
230
+ `only way to tell an attach that landed from one that silently did ` +
231
+ `nothing. Read-only. ` +
232
+ `\n\nReturns IDENTITY by default; pass verbosity: "full" for whole ` +
233
+ `bodies, which ${fullCost}.`, {
234
+ workflowId: z.string().describe("The workflow's id."),
235
+ verbosity: z
236
+ .enum(["identity", "full"])
237
+ .optional()
238
+ .describe('How much of each row to return. "identity" (default) is id, name, ' +
239
+ `description and status. "full" is the entire ${subject}, body ` +
240
+ "included."),
241
+ }, async ({ workflowId, verbosity }) => guard(async () => {
242
+ const response = await client.get(path(workflowId));
243
+ if (verbosity === "full")
244
+ return jsonResult(response);
245
+ return jsonResult(projectLinkRows(response, rowsKey));
246
+ }));
247
+ };
248
+ listWorkflowLinks("skill", "skills", (id) => `/api/v1/workflows/${id}/skills-v2`, "skills", "a skill's playbook makes expensive", "skill");
249
+ listWorkflowLinks("reference_doc", "reference_docs", (id) => `/api/v1/workflows/${id}/reference-docs`, "references", "a reference doc's content makes expensive", "reference");
226
250
  }
227
251
  /**
228
252
  * "What breaks if I change this" — the reverse look-up, for both halves of the
@@ -274,11 +298,23 @@ export function registerDependencyTools(server, client) {
274
298
  .describe("Which library item you are about to change."),
275
299
  entityId: z.string().describe("That item's id."),
276
300
  }, async ({ entityKind, entityId }) => guard(async () => {
277
- const base = {
301
+ const bases = {
278
302
  skill: "/api/v1/skills",
279
303
  policy: "/api/v1/policies",
280
304
  reference_doc: "/api/v1/reference-docs",
281
- }[entityKind];
305
+ };
306
+ const base = bases[entityKind];
307
+ // A kind outside the enum cannot reach here through a real client — zod
308
+ // rejects it first. It CAN reach here through the route sweeps, which
309
+ // call handlers directly, and an unguarded lookup then built
310
+ // `undefined/{id}/dependent-agents` and reported it as a route this
311
+ // connector calls. A tool must not answer a question it was not asked.
312
+ if (!base) {
313
+ throw new Error(`list_dependent_agents has no route for entityKind "${entityKind}". ` +
314
+ `It covers ${Object.keys(bases).join(", ")}; for a tool, agent, ` +
315
+ `flow, output schema or workflow named by a workflow DOCUMENT, ` +
316
+ `use list_workflows_using.`);
317
+ }
282
318
  return jsonResult(await client.get(`${base}/${entityId}/dependent-agents`));
283
319
  }));
284
320
  }