Skip to content

[plan] Add OutputSchema to status and compile MCP server tools #16918

@github-actions

Description

@github-actions

Objective

Add OutputSchema to the status and compile MCP server tools in pkg/cli/mcp_server.go so that LLM clients can understand the structure of tool responses before calling them.

Context

Discussion #16774 noted that go-sdk v1.2.0+ supports structured OutputSchema on tools, and the inspector's displayDetailedToolInfo() already handles rendering OutputSchema. The status and compile tools have well-defined JSON response structures that are ideal candidates.

Steps

  1. Open pkg/cli/mcp_server.go
  2. For the status tool, define a result struct (e.g. statusResult) with JSON tags matching the current tool output structure, then generate an OutputSchema using GenerateSchema[[]statusResult]() and attach it to the tool definition
  3. Do the same for the compile tool with its result struct
  4. Use the mcp.AddTool pattern already used in the file — attach OutputSchema to the &mcp.Tool{} struct
  5. Run make fmt && make build && make test-unit

Files to Modify

  • pkg/cli/mcp_server.go (primary)

Acceptance Criteria

  • status tool has OutputSchema defined matching its actual output structure
  • compile tool has OutputSchema defined matching its actual output structure
  • make build and make test-unit pass
  • Running gh aw mcp inspect against the local server shows output schemas for these tools

Generated by Plan Command for issue #discussion #16774

  • expires on Feb 21, 2026, 9:47 PM UTC

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions