Skip to content

fix(mcp): report completed connected tool - #1964

Open
dhairyashiil wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
dhairyashiil:codex/completed-call-activity
Open

fix(mcp): report completed connected tool#1964
dhairyashiil wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
dhairyashiil:codex/completed-call-activity

Conversation

@dhairyashiil

@dhairyashiil dhairyashiil commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Add an optional toolName to successful MCP execute results when a script uses exactly one distinct connected tool.

This gives MCP clients structured provenance for a completed result without changing the existing text result. Discovery and built-in calls, failed calls, and executions that use multiple distinct connected tools remain unlabeled. The internal per-call trace is not returned in the MCP response.

Review guide

  • tool-invoker records a dynamic connected-tool path only after a successful call.
  • engine keeps that trace internal and projects toolName only when one distinct path was used.
  • Unit and MCP end-to-end tests cover the projection, dynamic dispatch, repeated calls, multiple tools, and the non-leakage boundary.

Verification

  • npx bun@1.3.11 run format:check
  • npx bun@1.3.11 run lint
  • npx bun@1.3.11 run typecheck
  • npx bun@1.3.11 run test
  • npx bun@1.3.11 run --cwd e2e test:selfhost -- scenarios/tool-call-contract.test.ts

@dhairyashiil

Copy link
Copy Markdown
Author

@RhysSullivan could you please check and let me know if this makes sense? let me know if you need any changes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant