Skip to content

Conversation

@habema
Copy link
Contributor

@habema habema commented Dec 28, 2025

Adds tool_origin field to ToolCallItem and ToolCallOutputItem to track where function tools came from (regular functions, MCP servers, or agent-as-tool). This helps with debugging and tracing which MCP server handled a call when using multiple servers.

The tool_origin is a ToolOrigin object that contains:

  • type: The origin type (FUNCTION, MCP, or AGENT_AS_TOOL)
  • mcp_server_name: The MCP server name (only set for MCP tools)
  • agent_as_tool_name: The agent name (only set for agent-as-tool)

New tests added

Closes #2228

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

Enable to access MCP server name via its converted function tool object

1 participant