Skip to content

MCP: get_tool_schema should return output schema + support batch fetch #14

Description

@barockok

Context

Audit vs Composio COMPOSIO_GET_TOOL_SCHEMAS, which returns input + output schema and accepts multiple slugs per call. Workbench get_tool_schema returns input only, one tool per call.

Gap

  • Agent can't predict result shape → must execute to discover output, or guess downstream parsing.
  • One round-trip per schema lookup when prepping a multi-tool plan.

Proposal

  1. Extend get_tool_schema to accept tool: string | string[]; return a keyed map for arrays.
  2. Surface output schema where plugins define one. Add optional outputSchema to the plugin tool type; return alongside schema (input). Tools without it return input-only (no breakage).

Acceptance

  • Array input returns { [tool]: { input, output? } }.
  • Single string input keeps current shape (back-compat) or documented change.
  • Plugin SDK type gains optional outputSchema.
  • Tests: single, batch, unknown-tool-in-batch, tool with/without output schema.

Source

packages/server/src/mcp/meta-tools.ts (get_tool_schema, lines ~77-85).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions