mcptools
mcptools copied to clipboard
Tool title field not supported (MCP spec 2025-06-18)
Problem
The MCP spec (2025-06-18) defines an optional title field on tool definitions — a human-readable display name separate from the name identifier.
tool_as_json() only serializes name, description, and inputSchema. The title field is omitted.
Why This Matters
nameis a programmatic identifier (e.g.,"query_occurrences_ala")titleis a human-readable display name (e.g.,"Query ALA Occurrences")descriptionis the detailed explanation for the LLM
Clients use title in UI elements like tool pickers and confirmation dialogs. Without it, clients fall back to showing name (ugly) or description (verbose).
Expected
ellmer::tool(
fun = function() "...",
name = "query_occurrences_ala",
title = "Query ALA Occurrences",
description = "Search the Atlas of Living Australia for species occurrence records"
)
Should produce:
{
"name": "query_occurrences_ala",
"title": "Query ALA Occurrences",
"description": "Search the Atlas of Living Australia...",
"inputSchema": {...}
}
Fix
- Add
titleparameter toellmer::tool()(stores on ToolDef) - Include in
tool_as_json()output when present
Lower priority than #103 and #104 but straightforward to implement alongside them.