Skip to content

Tools without inputSchema are not visible in some MCP clients #79

Closed as not planned
@artemnovichkov

Description

@artemnovichkov

Is your feature request related to a problem? Please describe.
I experimented with the SDK and found a strange behavior. Tools without inputSchema are not visible in Cursor and Claude Desktop, but work fine in Visual Studio Code. Here is my fix to make them available everywhere:

let tool = Tool(name: "swift_version",
                description: "Returns the current Swift version",
                inputSchema: .object([
                    "type": .string("object")
                ]))

Here is a full code if my example:
https://github.com/artemnovichkov/swift-version-mcp/blob/master/Sources/SwiftVersionMCP/main.swift

I'm not sure is this problem related to the SDK or to the clients.

Describe the solution you'd like
If you want to use the tool without inputSchema, it may be configured like:

let tool = Tool(name: "swift_version",
                description: "Returns the current Swift version")

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions