From 3e431fca8824f37036f6627d55c4c2ab4da100b7 Mon Sep 17 00:00:00 2001 From: Max Isbey <224885523+maxisbey@users.noreply.github.com> Date: Tue, 28 Oct 2025 15:32:11 +0000 Subject: [PATCH] Add name and title fields to Tool class These fields were missing from the Tool type definition. --- src/mcp/types.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mcp/types.py b/src/mcp/types.py index 8713227404..8e79b87f82 100644 --- a/src/mcp/types.py +++ b/src/mcp/types.py @@ -871,6 +871,19 @@ class ToolAnnotations(BaseModel): class Tool(BaseMetadata): """Definition for a tool the client can call.""" + name: str + """ + Intended for programmatic or logical use, but used as a display name + in past specs or fallback (if title isn’t present). + """ + title: str | None = None + """ + Intended for UI and end-user contexts — optimized to be human-readable + and easily understood, even by those unfamiliar with domain-specific terminology. + + If not provided, the name should be used for display + (except for Tool, where annotations.title should be given precedence over using name, if present). + """ description: str | None = None """A human-readable description of the tool.""" inputSchema: dict[str, Any]