Skip to content
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

Add support for tool annotations #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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/specification#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant