Skip to content

chore(release): v1.1.4 — MCP annotations + tool description polish - #7

Merged
fengyat merged 1 commit into
mainfrom
feat/tool-annotations-and-descriptions
May 26, 2026
Merged

chore(release): v1.1.4 — MCP annotations + tool description polish#7
fengyat merged 1 commit into
mainfrom
feat/tool-annotations-and-descriptions

Conversation

@fengyat

@fengyat fengyat commented May 26, 2026

Copy link
Copy Markdown
Member

Why

Glama's score page flagged the same root cause across all four tools — no MCP annotations declared, so reviewer scoring penalizes the Behavior dimension (2-4 out of 5) for every tool. Sample reviewer comment from orcarouter_model_card:

No annotations are present, so the description bears full burden. It indicates a read-like operation (get info) but does not explicitly state it is non-destructive, mention authorization needs, rate limits, or potential error conditions.

This PR closes that gap. It also tightens descriptions for the other low-scoring dimensions (Usage Guidelines, Completeness, Parameters).

What changes

File Change
src/tools/types.ts Add ToolAnnotations interface + optional annotations field on ToolDefinition.
src/server.ts Pass annotations through to the tools/list response (spread ...(t.annotations ? { annotations: t.annotations } : {})).
src/tools/chat.ts Add annotations (readOnly:false, idempotent:false, openWorld:true) + describe models fallback chain interaction, isError:true surface, ORCAROUTER_API_KEY requirement.
src/tools/models_list.ts Add annotations (readOnly:true, idempotent:true, openWorld:true) + enumerate returned fields + note filter composition.
src/tools/model_card.ts Add annotations (read-only / idempotent / open-world) + explain when to use vs. models_list + note isError:true surface.
src/tools/providers_list.ts Add annotations + enumerate returned fields + note zero-arg call shape.
test/server.test.ts New case: tools/list response includes MCP annotations on every tool asserts the per-tool annotation map (4 tools × 5 fields).
package.json, server.json Version bump 1.1.3 → 1.1.4.
CHANGELOG.md v1.1.4 entry.

Per-tool annotations table

Tool readOnly destructive idempotent openWorld
orcarouter_chat F F F T
orcarouter_models_list T F T T
orcarouter_model_card T F T T
orcarouter_providers_list T F T T

Reasoning: catalog tools are read-only queries against the public OrcaRouter catalog API — same inputs give the same outputs (idempotent), and they reach an external service (open world). The chat tool reaches an external service too, but isn't read-only (it triggers an LLM completion, which the upstream provider may count, log, and bill), and isn't idempotent (same prompt produces different completions).

What it unlocks downstream

  • Glama TDQS: Behavior dimension should jump from 2-4 to ~5 across all tools. Expected overall TDQS average: 4.2 → ~4.6. Already at grade A; this firms up the score.
  • MCP clients with annotation-aware UI: Claude Desktop, Cursor, Windsurf, etc. can render the catalog tools as "safe to call without confirmation" and the chat tool as "calls an external LLM".
  • Better LLM tool selection: agents that consume tools/list get richer signal about each tool's character.

Verification

  • npm run typecheck — clean
  • npm test — 116/116 (115 existing + 1 new annotations test)
  • npm run build — 26.51 KB ESM bundle, clean
  • server.json validates against the official MCP Registry schema

Release plan

After merge, push the version tag and the CI auto-publish workflow (introduced in #3) takes over:

git tag v1.1.4
git push origin v1.1.4
# CI: typecheck → test → build → npm publish → mcp-publisher publish

Once npm + MCP Registry are updated, Glama auto-syncs from GitHub (typically within a few hours), re-runs TDQS scoring, and the new annotations land in the public score.

Adds `annotations` to every tool (readOnly/destructive/idempotent/openWorld
+ title) per MCP spec 2025-06-18. MCP clients can now reason about a tool
before they call it — e.g. render a "read-only, safe to call" badge on the
three catalog tools, or route the chat tool through an approval workflow.

Per-tool hints:
  orcarouter_chat               readOnly:F  idempotent:F  openWorld:T
  orcarouter_models_list        readOnly:T  idempotent:T  openWorld:T
  orcarouter_model_card         readOnly:T  idempotent:T  openWorld:T
  orcarouter_providers_list     readOnly:T  idempotent:T  openWorld:T

Tool descriptions tightened to close gaps Glama's TDQS reviewer flagged:
  - chat:          explain models fallback chain, isError surface,
                   ORCAROUTER_API_KEY requirement.
  - model_card:    explain when to use vs. models_list; note isError.
  - models_list:   enumerate returned fields, note filter composition.
  - providers_list: enumerate returned fields, note zero-arg call shape.

No wire-level behavior change. tools/call response shapes are unchanged.

Test: new `tools/list response includes MCP annotations on every tool`
case in test/server.test.ts asserts per-tool annotation values. Existing
115 tests unchanged; full suite is 116/116 green.
@fengyat

fengyat commented May 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengyat
fengyat merged commit 2193fde into main May 26, 2026
1 check 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