What is missing
The MCP Spec updated awhile back to include a title attribute - https://modelcontextprotocol.io/specification/2025-06-18/changelog. I found a similar issue and PR in the AI SDK
I want to be able to display the friendly title attribute in our UI rather than the name
Clanker investigation
File: tmp/agents/packages/agents/src/mcp/client.ts
Function: getAITools() at lines 1319–1379. The exact tool-object build is lines 1337–1371.
The fix mirrors the Vercel PR — add one line resolving the title and one line including it in the emitted object:
// inside the for-of at line 1334
for (const tool of getNamespacedData(connections, "tools")) {
try {
const toolKey = `tool_${tool.serverId.replace(/-/g, "")}_${tool.name}`;
const title = tool.title ?? tool.annotations?.title; // ← add
entries.push([
toolKey,
{
description: tool.description,
title, // ← add
execute: async (args) => { /* ...unchanged... */ },
inputSchema: /* ...unchanged... */,
outputSchema: /* ...unchanged... */
}
]);
} ...
Why the types already work
The MCP SDK's ToolSchema at @modelcontextprotocol/sdk/dist/esm/types.d.ts:2381-2419 already declares both title: z.ZodOptional<z.ZodString> (line 2418, top-level per the 2025-11 spec) and annotations.title (line 2394, legacy). Since getNamespacedData(connections, "tools") returns (Tool & { serverId: string })[] (tmp/agents/packages/agents/src/mcp/client.ts:1590), tool.title and tool.annotations?.title are already type-safe — no type changes needed in agents.
Downstream, ToolSet in ai@6.0.58 accepts title?: string on each tool (Tool in @ai-sdk/provider-utils/dist/index.d.ts:1065), so there's nothing to widen there either.
What is missing
The MCP Spec updated awhile back to include a
titleattribute - https://modelcontextprotocol.io/specification/2025-06-18/changelog. I found a similar issue and PR in the AI SDKI want to be able to display the friendly
titleattribute in our UI rather than thenameClanker investigation
File: tmp/agents/packages/agents/src/mcp/client.ts
Function: getAITools() at lines 1319–1379. The exact tool-object build is lines 1337–1371.
The fix mirrors the Vercel PR — add one line resolving the title and one line including it in the emitted object:
Why the types already work
The MCP SDK's ToolSchema at @modelcontextprotocol/sdk/dist/esm/types.d.ts:2381-2419 already declares both title: z.ZodOptional<z.ZodString> (line 2418, top-level per the 2025-11 spec) and annotations.title (line 2394, legacy). Since getNamespacedData(connections, "tools") returns (Tool & { serverId: string })[] (tmp/agents/packages/agents/src/mcp/client.ts:1590), tool.title and tool.annotations?.title are already type-safe — no type changes needed in agents.
Downstream, ToolSet in ai@6.0.58 accepts title?: string on each tool (Tool in @ai-sdk/provider-utils/dist/index.d.ts:1065), so there's nothing to widen there either.