Skip to main content
Glama

Get A2A Task

a2a_get_task
Read-onlyIdempotent

Retrieve the current status, progress, and artifacts of an existing agent task by its task ID and agent card URL. Use it to determine if a submitted task completed, failed, or remains in progress.

Instructions

Retrieve the status and details of an A2A task by its ID.

This tool fetches information about a previously created task, including its current status, progress, and any generated artifacts.

Args:

  • agentCardUrl (string): URL to the agent's card endpoint

  • taskId (string): The unique identifier of the task to retrieve

Returns: JSON response containing task information:

  • id: Task identifier

  • status: Object with state ("submitted", "in_progress", "completed", "failed", "canceled") and optional progress information

  • artifacts: Array of generated outputs, each with:

    • artifactId: Unique identifier

    • name: Artifact name/title

    • kind: Type of artifact (e.g., "text", "image", "file")

    • parts: Artifact content

  • messages: Conversation history associated with the task

  • created: Task creation timestamp

  • updated: Last update timestamp

Examples:

Error Handling:

  • Returns "Error: Task not found" if the task ID doesn't exist

  • Returns "Error: Failed to connect to agent" if the agent is unreachable

  • Task status will indicate "failed" if the task encountered errors during execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe unique identifier of the task to retrieve
agentCardUrlYesURL to the agent's card endpoint
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Even though annotations already mark the tool as readOnly and idempotent, the description adds meaningful behavioral detail: the full set of task statuses, the shape of artifacts, conversation messages, created/updated timestamps, and concrete error strings. This goes well beyond the annotation hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with clear sections (Args, Returns, Examples, Error Handling) and front-loads the core purpose. It is somewhat long, but the extra detail is justified because there is no output schema and the error-handling information is genuinely useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description compensates fully by documenting the response structure, status states, error cases, and typical invocation examples. It also explains where to obtain the taskId, leaving little ambiguity for an agent selecting or calling this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents both parameters fully, including types and descriptions. The description mostly restates these in the Args section, but it does add illustrative example parameter values, which is helpful but not a major semantic addition beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Retrieve the status and details of an A2A task by its ID.' It clearly states what the tool does and covers the key returned data (status, progress, artifacts), making it easy to distinguish from the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases with 'Use when' examples and a direct exclusion: 'Don't use when: You want to send a new message (use a2a_send_message instead)'. This gives an agent clear routing guidance relative to a sibling tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ericabouaf/a2a-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server