Skip to content

process_tool_call additional parameters (ToolDefinition & tool-ids) #3065

@ChuckJonas

Description

@ChuckJonas

Description

I'd like to propose adding additional parameters to the MCP process_tool_call hook:

  1. ToolDefinition: Right now, we just get the tool_name, however, the ToolDefinition may contain information (particularly MCP tool metadata) useful in middleware scenario, additional validation, etc.

  2. tool_call_id: This primarily would be useful to be able to pass along to MCP toolcall meta for log correlation... I actually assumed this was part of the MCP toolcall protocol, but it doesn't seem to be present from what I can tell.

References

https://ai.pydantic.dev/mcp/client/#tool-call-customization

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions