Skip to content

Use interceptors for session/stateful tool calls #362

@jplattel

Description

@jplattel

With #297 (comment) having an interceptor works for stateless tool requests. That's nice!

Due to optimizations and our stateful backend it would be very nice that a session would also use the client.tool_interceptors when making a tool call. So using:

with client.session() as session: 
    session.call_tool(toolname, **kwargs)

Would also call the interceptor, allowing us to override the headers for example. This currently does not seem to happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions