Skip to content

Add support for tool annotations #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025
Merged

Add support for tool annotations #47

merged 1 commit into from
Apr 15, 2025

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Apr 3, 2025

This PR adds support for comprehensive tool annotations for better describing tool behavior, like whether it is read-only or destructive (modelcontextprotocol/modelcontextprotocol#185), added in the 2025-03-26 version of the MCP specification.

let searchTool = Tool(
    name: "web_search",
    description: "Search the web for information",
    inputSchema: [
        "query": ["type": "string", "description": "The search query"]
    ],
    annotations: .init(
        title: "Web Search",
        readOnlyHint: true,
        openWorldHint: true
    )
)

@mattt mattt force-pushed the mattt/tool-annotations branch 2 times, most recently from cfa1848 to fbe03f0 Compare April 3, 2025 13:21
@mattt mattt force-pushed the mattt/tool-annotations branch from fbe03f0 to ec5441a Compare April 3, 2025 13:25
@jspahrsummers jspahrsummers moved this to In Progress in 2025-03-26 Implementation Apr 7, 2025
@mattt mattt merged commit 4143f35 into main Apr 15, 2025
1 check passed
@mattt mattt deleted the mattt/tool-annotations branch April 15, 2025 12:42
@github-project-automation github-project-automation bot moved this from In Progress to Done in 2025-03-26 Implementation Apr 15, 2025
@mattt mattt self-assigned this Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant