Reduce Mcp Tool Surface Footprint

tasks19/22
Created Updated openspec/changes/reduce-mcp-tool-surface-footprint/tasks.mdView on GitHub →

1. OpenSpec

  • 1.1 Capture research reports under tmp/workstreams/.
  • 1.2 Create proposal, design, spec delta, and tasks for MCP tool-surface footprint reduction.
  • 1.3 Validate with openspec validate reduce-mcp-tool-surface-footprint --strict.

2. Server Instructions

  • 2.1 Add a compact PDPP MCP instructions string in packages/mcp-server/src/server.js or a small adjacent module.
  • 2.2 Pass the instructions through createPdppMcpServer() into McpServer.
  • 2.3 Add a focused test that proves initialize exposes the instructions.

3. Tool Description De-Duplication

  • 3.1 Replace repeated connection_id field prose with a short field description and keep action-specific ambiguity guidance only where needed.
  • 3.2 Replace repeated FILTER_DESCRIPTION prose with a compact typed-object example and move shared details to server instructions.
  • 3.3 Keep the full event-subscription signing/delivery contract on discover_event_subscription_capabilities only.
  • 3.4 Replace the repeated event-subscription footer on create/list/get/update/delete/test tools with a one-sentence pointer to discovery.
  • 3.5 Remove or shorten read-tool text that implies structuredContent is hidden from model context.

4. Measurement And Regression Tests

  • 4.1 Add a test helper that serializes the default tool list in the same shape MCP exposes.
  • 4.2 Assert the default tool list stays below 45 KB for the current 14-tool surface.
  • 4.3 Assert long event-subscription and connection_id guidance is not duplicated across many tool schemas.
  • 4.4 Assert filter remains object-shaped for query_records, aggregate, and search.

5. Verification

  • 5.1 Run focused MCP server tests.
  • 5.2 Run pnpm --dir packages/mcp-server test or the package's equivalent focused test command.
  • 5.3 Run openspec validate reduce-mcp-tool-surface-footprint --strict.
  • 5.4 Record before/after tools/list byte and token estimates in a workstream handoff.

6. ChatGPT Retest

  • 6.1 Deploy after owner review.
  • 6.2 Ask the owner to delete/re-add the ChatGPT app and retest schema, list_streams, query_records, search, and aggregate.
  • 6.3 Record whether ChatGPT sees typed object filters and whether any tool-list or tool-result truncation appears.