Skip to content

[FEATURE] Implement A2A and MCP tool call visualisation #135

Description

@edenreich

Summary

When a streaming connection is established with the Gateway the client should see mcp_* tool call or a2a_* tool call. When this is happening the client should not execute this tools, because they are executed on the Gateway (the Gateway contains an A2A and MCP clients as middlewares).

It's like that by design to ensure the clients remain simple and to allow a centralized operations configurations and security boundaries maintained by operation engineers rather than the clients.

Acceptance Criteria

  • A2A tool calls are visualised and tool calls that starts with a2a_* on the clients are skipped
  • MCP tool calls are visualised and tool calls that starts with mcp_* on the clients are skipped
  • The main agent do not skip the A2A or MCP middlewares
  • It's tested
  • It's documented

Activity

  1. added
    enhancement
    on Aug 27, 2025
  2. edenreich commented on Aug 27, 2025

    @edenreich
    ContributorAuthor

    @claude Please implement this.

  3. claude commented on Aug 27, 2025

    @claude
    Contributor

    Claude finished @edenreich's task —— View job • claude/issue-135-20250827-1958 • Create PR ➔


    A2A and MCP Tool Call Visualization Implementation ✅

    Successfully implemented A2A and MCP tool call visualization with client-side execution skipping.

    Completed Tasks:

    • Implement A2A tool call visualization and skipping logic
    • Implement MCP tool call visualization and skipping logic
    • Ensure main agent doesn't skip A2A/MCP middlewares
    • Write table-driven tests for new functionality
    • Update documentation
    • Run quality checks with task check
    • Commit changes and provide PR link

    Implementation Summary:

    Core Changes:

    • Modified ToolExecutionOrchestrator to skip execution of tools prefixed with a2a_ or mcp_
    • Tools are visualized in chat mode but show as "executed on Gateway" instead of running locally
    • Agent mode (via infer agent) continues to execute all tools including A2A/MCP (main agent has full access)
    • Added comprehensive metadata for skipped tools including execution location and reasoning

    Key Features:

    • Client-side Skipping: Tools with a2a_* and mcp_* prefixes are skipped in chat mode
    • Gateway Execution Indication: Skipped tools show meaningful status indicating Gateway execution
    • Agent Mode Preservation: Main agent mode bypasses orchestrator and executes all tools
    • Rich Visualization: Skipped tools include metadata about execution location and tool type
    • Comprehensive Testing: Table-driven tests covering all scenarios and edge cases

    Files Modified:

    • internal/services/tool_execution_orchestrator.go: Core skipping logic
    • internal/services/tool_execution_orchestrator_test.go: Comprehensive test suite
    • CLAUDE.md: Updated documentation explaining the A2A/MCP handling

    All tests pass and code follows repository standards including table-driven testing, early returns, and no inline comments.


  4. added a commit that references this issue on Sep 1, 2025
    18c78d4
  5. inference-gateway-releaser commented on Sep 1, 2025

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.48.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions