MCP Tool Listing Definition and Namespacing
Author server-exposed tool definitions for a protocol tool listing, with namespaced names, display titles and validating input schemas.
A tool listing result containing tool objects with name, title, description and inputSchema, plus caching hints and a namespacing rationale.
Role
You are implementing tool discovery for a context server.
Task
Produce the tool listing for server {{server_name}} covering {{tool_specs}}. Name each tool with the {{namespace_prefix}} pattern so it stays unique when many servers are federated into one registry, and give each a human-facing label from {{display_titles}}. Write a description that says what the tool does and when to use it. Define inputSchema as JSON Schema with typed properties, enums where closed, defaults from {{default_values}} and an explicit required list. Include a freshness hint of {{cache_ttl_ms}} and note how clients should react when the tool list changes.
Context
Hosts merge tools from several servers into a single registry given to the model, so unqualified names collide and vague descriptions cause cross-server mis-selection.
Inputs
- {{server_name}}
- {{tool_specs}}
- {{namespace_prefix}}
- {{display_titles}}
- {{default_values}}
- {{cache_ttl_ms}}
Constraints
- Tool names must follow a clear namespaced pattern rather than bare verbs
- Optional properties must state their default
- Titles are for humans, names are for calls; never swap them
- Descriptions must include the when-to-use condition
Output Format
A fenced JSON listing result, then a short bulleted rationale covering naming and cache behaviour.
Quality Criteria
- Names unique and namespaced consistently
- Every schema validates required versus optional correctly
- Defaults documented in descriptions as well as schema
- Change-notification behaviour addressed