Skip to content

feat(mcp): annotate tools and publish typed output schemas - #20

Merged
TudorAndrei merged 3 commits into
mainfrom
feat/mcp-tool-metadata
Nov 30, 2026
Merged

TudorAndrei merged 3 commits into
mainfrom
feat/mcp-tool-metadata

Conversation

@TudorAndrei

@TudorAndrei TudorAndrei commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

Aether uses MCP standards where they fit. This is the first step: clients get tool metadata and typed results, and the server is on protocol 2026-07-28. MCP Tasks and URL elicitation come in later PRs on top of this one.

What changes

Item Before After
rmcp requirement 3.2.0 3.9 (protocol 2026-07-28: server/discover, stateless _meta)
Tool annotations none title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint on all 29 tools
outputSchema none 21 tools publish an object-root schema
Result JSON as text same JSON as text and in structuredContent
One-sentence results (for example removed) text text only, no schema
  • aether.task.send and aether.inbox.read share SentResultOutput. The untrusted object stays nested and unchanged.
  • The tools/list order was already deterministic: rmcp sorts tools by name.
  • Left out on purpose: schemas for one-sentence results. MCP 2025-06-18 and 2025-11-25 require an object root, and some clients refuse the full tool list otherwise.

Look at: the annotation table in every_tool_pins_annotation_hints (crates/aether/src/mcp/tools/mod.rs). These values decide which tools a client may run without a prompt.

Evidence

  • mise run fmt: pass.
  • mise run lint: pass.
  • cargo test --workspace: pass (478 + 79 + 8 + 3 unit and integration tests, 98 feature scenarios).
  • mise run hermes-plugin-test: OK, 3 skipped (Hermes is not on PYTHONPATH).
  • New tests: annotation table, object-root outputSchema for every tool, object structuredContent for typed results, and a stateless 2026-07-28 server/discover → tools/list → tools/call run without initialize. The existing 2025-06-18 initialize test stays.
  • Not checked: a live run in Claude Code, Codex, or another MCP client.

Merge danger

Door: two-way
Blast radius: one node

The text block keeps the same JSON fields, so clients that read text keep working. JSON key order in the text can change, because typed structs now write it. A client that compares the text byte by byte, not as JSON, could see a difference.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Every tool sets title, readOnlyHint, destructiveHint, idempotentHint and
openWorldHint. Tools with a structured result publish an object-root
outputSchema and return the same JSON in structuredContent and in the
text block. Tools that answer with one sentence stay text only.

A stateless 2026-07-28 test calls server/discover, tools/list and
tools/call without initialize.
@TudorAndrei
TudorAndrei merged commit c0bc12f into main Nov 30, 2026
13 checks passed
@TudorAndrei
TudorAndrei deleted the feat/mcp-tool-metadata branch November 30, 2026 12:18
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