Skip to content

docs(agent-tool-use): a tool is a composable function - the MCP binding's declaration shape, the Playground calls mermaid.render - #630

Merged
acn-ericlaw merged 3 commits into
mainfrom
feat/agent-tool-use
Nov 16, 2026
Merged

acn-ericlaw merged 3 commits into
mainfrom
feat/agent-tool-use

Conversation

@acn-ericlaw

Copy link
Copy Markdown
Contributor

What

draft-design-specs/agent-tool-use.md records the 2026-11-16 review of the MCP binding's shape: a tool of an MCP server is
a composable function of the language pack, declared in its code as a preload function bound through an encapsulated
client (bind(server, tool, schema_sha256)), the server file keeps servers only, a route names the capability and never the
transport (mermaid.render), and an engine-side function in front of a pack route is business logic of the graph that stays
when it does more than call the tool. Section 9 of llm-helper-agent-loop.md and the adapter-B passage of
ai-agent-orchestration.md carry dated pointers; ADR-0033 gains one consequence sentence, the decision untouched. The
Playground's diagram-assistant follows: DiagramRender calls mermaid.render, MockDiagramRender serves it,
DiagramAssistantTest's javadoc follows, event-over-http.yaml maps it, mcp/mermaid-servers.yml keeps the server only
as an optional copy of the binding's default entry, and the graph README, the example README and the unreleased CHANGELOG
entry name the function instead of the old route. mvn test -f examples/minigraph-playground/pom.xml -Dtest=DiagramAssistantTest:
4 tests, 0 failures. The packs' halves are Accenture/mercury-python#55 and Accenture/mercury-nodejs#122.

Why

The binding built on 2026-11-14 conjured each tool's route at boot from a YAML allowlist row as an alias of a private
mcp.tool function, so the Playground's diagram.render called a route, diagram.render.mcp, that no preload in the pack
declared: a non-standard mechanism a developer could forget, and a second place to look. The review weighed a generic public
mcp.tool route with the server and the tool named in the call (ADR-0033's rejected alternative, which would have needed a
rule that no catalog row names it directly) against a pack function per tool bound in code, and chose the latter: the
architecture of one route per tool with a pinned digest is kept, the generic route disappears instead of being guarded, and
the engine stays MCP-free and tool-free as design (d) of ADR-0033 intends. The route name drops the transport because a tool
may start as an MCP tool and later be implemented another way while the graph stays unchanged.

🤖 Generated with Claude Code
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

acn-ericlaw and others added 2 commits November 16, 2026 12:50
…ng's declaration shape, the Playground calls mermaid.render

The design spec draft-design-specs/agent-tool-use.md records Eric's review of 2026-11-16:
the packs declare each MCP tool as a preload function bound in code through an
encapsulated client (bind(server, tool, digest)), the server file keeps servers only,
a route names the capability, never the transport, and the engine-side DiagramRender
stays as the graph's business logic; a generic public mcp.tool route was proposed and
set aside, so ADR-0033 stands (one consequence line). Section 9 of the agent-loop spec
and the orchestration concept's adapter-B passage point to it. The Playground's
diagram-assistant calls mermaid.render: DiagramRender, its mock, its test, the route
map, the server file (servers only, an optional copy of the binding's default entry),
both READMEs and the unreleased CHANGELOG entry. DiagramAssistantTest: 4 tests green.
The packs: mercury-python #55 and mercury-nodejs #122.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the reshaped MCP binding, both packs

Both packs' bindings (mercury-python #55, mercury-nodejs #122, merged) and the Playground
built from this branch, against the live Mermaid server: two runs, 200 each, two model turns
on Haiku 4.5, the image stored, 20 trace records per run with every parent owned by a record -
the pack leg's ancestry continuous from mermaid.render to the REST entry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw

Copy link
Copy Markdown
Contributor Author

The end-to-end regression on the live Mermaid server is recorded in docs/test-reports/agent-tool-use-live-drive.md (second commit): the Playground built from this branch, driven once through the Python binding and once through the Node.js binding after their PRs merged - 200 each, two model turns on Haiku 4.5, the image stored, 20 trace records per run with every parent owned by a record.

… strict docs build cannot resolve a file outside docs/

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw
acn-ericlaw merged commit a69d3e0 into main Nov 16, 2026
6 checks passed
@acn-ericlaw
acn-ericlaw deleted the feat/agent-tool-use branch November 16, 2026 05:14
acn-ericlaw added a commit that referenced this pull request Nov 16, 2026
…hape and the Playground on mermaid.render, recorded as landed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant