Back to feed
Dev.to
Dev.to
7/20/2026
Your MCP Server's Client Is a Language Model. Write the Contract Like You Mean It

Your MCP Server's Client Is a Language Model. Write the Contract Like You Mean It

Short summary

The Model Context Protocol turns internal scripts into APIs consumed by language models, not human developers. This article argues MCP server tool descriptions must be treated as strict contracts: JSON Schema constraints replace prose, structured output replaces friendly paragraphs, and error codes must map to specific agent recovery actions. Every ambiguity in an agent-facing tool compounds across all sessions that hit the same fork.

  • MCP tool descriptions are contracts read by agents, not humans — ambiguity compounds at scale
  • Express constraints in JSON Schema, not prose; return structured output, not paragraphs
  • Error codes should be append-only and map to exactly one agent recovery action

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more