Skip to content

Add truthful MCP tool contracts - #5

Open
epistemedeus wants to merge 1 commit into
observer-protocol:mainfrom
epistemedeus:improve-mcp-contracts
Open

Add truthful MCP tool contracts#5
epistemedeus wants to merge 1 commit into
observer-protocol:mainfrom
epistemedeus:improve-mcp-contracts

Conversation

@epistemedeus

Copy link
Copy Markdown

Why

A credential-free audit of the live MCP endpoint found that all six tools had descriptions and input schemas, but none had titles or output schemas. Reading the source also exposed one description/runtime drift: get_merchant said Tier 2 required a credential, while the implementation and tests intentionally give anonymous and credentialed callers the same read access.

This keeps the repair narrow:

  • add human-readable titles to all six tools;
  • move registration to the current registerTool API;
  • add strict output schemas and matching structuredContent only for the three compact deterministic results: list_categories, list_rails, and whoami;
  • retain text content for compatibility;
  • leave search, full merchant records, and live verification text-only until their larger result unions are modeled truthfully;
  • correct the get_merchant credential description.

The SDK validates successful structured results against the declared schemas. The in-memory MCP tests also prove that exactly the intended three tools advertise output schemas and that whoami returns identical text and structured content.

Validation

  • pnpm -r lint
  • pnpm -r typecheck
  • pnpm -r test (114 tests across core and MCP)
  • pnpm validate-data
  • pnpm -r build

All pass from a clean dependency install using the repository-pinned pnpm 11.1.2.

This changes no merchant data, read access, rate limits, transport, payment verification, or live probe behavior.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

👷 Deploy request for agentterminal pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 390a703

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