Skip to content

[API]: Return the agent's tool id on A2AAgentRead #7602

Open

Description

@a-effort

Summary
A2AAgentRead omits tool_id (schemas.py:7148), so a client cannot tell which tool belongs to an agent. The client has to request GET /tools with limit=0 and match annotations.a2a_agent_id on each tool, because list_tools accepts no integration_type or a2a_agent_id filter. The virtual server builder needs the link: adding an agent to a virtual server writes server_tool_association, and list_server_tools reads only that table (tool_service.py:4984).

Return this column on A2AAgentRead: a2a_agents.tool_id is a foreign key to tools.id with ondelete SET NULL (db.py:5067), indexed at db.py:5083, and register_agent sets it after it creates the tool for the agent (a2a_service.py:1175).

Proposed changes

  • Add tool_id to A2AAgentRead.
  • Return null when the agent has no tool.
  • Read the value from the existing column, without a query per agent in the list path.

Acceptance criteria

  • GET /v1/a2a/{agent_id} returns tool_id.
  • GET /v1/a2a returns tool_id for every agent.
  • tool_id is null when the tool is missing or was deleted.
  • Listing agents runs the number of queries it runs today.

Not included: a filter on GET /tools for integration_type or a2a_agent_id.

Related issues: #7024, #7023

Activity

  1. added
    triageIssues / Features awaiting triage
    agentsAgent Samples
    a2aSupport for A2A protocol
    apiREST API Related item
    on Nov 18, 2026
  2. austinchennn commented on Nov 18, 2026

    @austinchennn

    May I implement this after you accept the scope and remove triage?

    I propose exposing the existing tool_id column through A2AAgentRead. I will check:

    • Single-agent and list responses.
    • Null values for missing tools.
    • An unchanged query count for agent lists.

    I will wait for your confirmation before implementation.

  3. added theissue type on Nov 18, 2026
  4. added
    ui-rewriteTasks for the isolated ui rewrite feature branch
    1.1-Phase-2Phase 2 Protocol Matching in 1.1 Delivery. No inter protocol connection.
    on Nov 18, 2026
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

    1.1-Phase-2Phase 2 Protocol Matching in 1.1 Delivery. No inter protocol connection.a2aSupport for A2A protocolagentsAgent SamplesapiREST API Related itemtriageIssues / Features awaiting triageui-rewriteTasks for the isolated ui rewrite feature branch

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions