Skip to content

MCPB tools should include input/output schema #122

@asklar

Description

@asklar

It would be beneficial to models to know not just the description of tools but their input/output schemas.

Proposal

Add optional inputSchema and outputSchema members to the tools object, matching the output from the tools/list message.
title is also potentially valuable, and keeps in line with tools/list.

Example

{
// ...
  "tools": [
    {
      "name": "get_weather_data",
      "title": "Weather Data Retriever",
      "description": "Get current weather data for a location",
      "inputSchema": {
        "type": "object",
        "properties": {
          "location": {
            "type": "string",
            "description": "City name or zip code"
          }
        },
        "required": ["location"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "temperature": {
            "type": "number",
            "description": "Temperature in celsius"
          },
          "conditions": {
            "type": "string",
            "description": "Weather conditions description"
          },
          "humidity": {
            "type": "number",
            "description": "Humidity percentage"
          }
        },
        "required": ["temperature", "conditions", "humidity"]
      }
    }
  ]
  // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions