Skip to content

feat(mcp): surface tool annotations in tools-list output - #17

Merged
nictuku merged 1 commit into
mainfrom
nictuku/tool-annotations
May 12, 2026
Merged

nictuku merged 1 commit into
mainfrom
nictuku/tool-annotations

Conversation

@nictuku

@nictuku nictuku commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Parse and preserve MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) in ToolDefinition.
  • Prefix every pipeboard mcp tools-list line with a short category tag: [read], [write], [idem], [del], or [?] (empty annotations).
  • Verbose mode (--verbose) prints the full annotations object alongside the schema.
  • --json mode passes annotations through untouched (round-trips through ~/.pipeboard/tools-cache.json).

Driven by the Pipeboard MCP servers now emitting annotations on tools/list (MCP spec 2025-06-18) so Codex skips confirmation prompts on reads and Claude.ai groups tools into Read-only vs Write/delete buckets.

Test plan

  • make build test lint — green
  • New unit tests cover toolCategoryLabel and annotation round-trip through marshal/unmarshal
  • Smoke-tested against local dev server (http://localhost:4100): all 12 secondary MCP servers render category tags correctly in both pretty and --json modes

Servers can now advertise readOnlyHint / destructiveHint / idempotentHint /
openWorldHint on each tool (MCP spec 2025-06-18). The CLI now:

- Parses and preserves annotations in ToolDefinition (round-trips through
  the local tools-cache.json).
- Prefixes every line of tools-list output with a category tag — [read],
  [write], [idem], [del], or [?] when a server omits annotations.
- Prints the full annotations object in --verbose mode.
- Passes annotations through --json mode untouched.
@nictuku
nictuku merged commit fc9f56b into main May 12, 2026
2 checks passed
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