Skip to content

feature: withAny tool argument #345

Open
@0xNF

Description

@0xNF

Problem Statement

There's no way to specify that a tool argument can be any shape. withNumber, withBoolean, withArray, withObject, withString exist, but there's nothing for a schema-less type.

Proposed Solution

JSON Schema defines the any type as an empty object:

"properties": {
        "F1": {
            "type": "string"
        },
        "F2": {
            "type": "integer"
        },
        "F3": {}
    },

where F3 is any.

I'd like to see a withAny tool argument method.

Example Usage

	tool := mcp.NewTool(
		toolName,
		mcp.WithDescription(toolDescription),
		mcp.WithAny("freeEntry"),
	)

Metadata

Metadata

Assignees

Labels

area: sdkSDK improvements unrelated to MCP specificationtype: enhancementNew feature or enhancement request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions