Skip to main content
Glama

get_async_run_result

Retrieve the result of an asynchronous run by specifying a run ID, enabling integration between ACP-based AI agents and MCP-compatible systems.

Instructions

Get the result of an asynchronous run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool()-decorated handler function that implements the core logic of get_async_run_result. It queries the run status, processes the output messages, and returns a formatted JSON result.
    @mcp.tool()
    async def get_async_run_result(run_id: str) -> str:
        """Get the result of an asynchronous run"""
        
        try:
            run = await orchestrator.get_run_status(run_id)
            
            result = {
                "run_id": run.run_id,
                "agent_name": run.agent_name,
                "status": run.status,
                "has_output": len(run.output) > 0,
                "error": run.error
            }
            
            if run.status == RunStatus.COMPLETED and run.output:
                # Convert output to readable format
                output_text = ""
                for message in run.output:
                    if isinstance(message, dict) and "parts" in message:
                        for part in message["parts"]:
                            if isinstance(part, dict) and "content" in part:
                                output_text += part["content"] + "\n"
                result["output"] = output_text.strip() if output_text else "No text content"
            
            return json.dumps(result, indent=2)
            
        except Exception as e:
            return f"Error: {e}"
  • Invocation of register_orchestrator_tools which defines and registers the get_async_run_result tool (along with related tools) with the FastMCP server instance.
    register_orchestrator_tools(self.mcp, self.orchestrator)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves results but doesn't describe key behaviors: whether it's idempotent, if it polls or waits for completion, error handling for invalid run_ids, or performance characteristics like latency. The description is minimal and fails to provide necessary operational context for safe and effective use.

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

Conciseness5/5

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

The description is extremely concise—a single sentence with no wasted words. It's front-loaded with the core purpose ('Get the result'), making it easy to scan. Every word earns its place, and there's no redundancy or unnecessary elaboration, which is efficient for quick understanding.

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

Completeness3/5

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

Given the tool's moderate complexity (asynchronous result retrieval), lack of annotations, and presence of an output schema, the description is minimally complete. It states the purpose but misses usage guidelines and behavioral details. The output schema likely covers return values, reducing the burden, but without annotations, more context on how the tool operates would be beneficial. It's adequate but has clear gaps.

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 description adds no parameter semantics beyond what the input schema provides. With 0% schema description coverage and 1 parameter (run_id), the schema only indicates it's a required string titled 'Run Id'. The description doesn't explain what a run_id is, how to obtain it, or its format. However, since there's only one parameter and the tool's purpose implies its use, a baseline score of 3 is appropriate, though additional details would improve clarity.

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

Purpose3/5

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

The description states the tool's purpose as retrieving results from asynchronous runs, which is clear but vague. It uses the verb 'Get' with the resource 'result of an asynchronous run', but doesn't specify what constitutes a 'run' or what format the results take. Compared to siblings like 'list_active_runs' or 'run_acp_agent', it distinguishes itself by focusing on results rather than listing or initiating runs, though the distinction could be more explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a run_id from a prior operation), exclusions, or how it relates to sibling tools like 'list_active_runs' or 'run_acp_agent'. Without this context, users must infer usage based on the tool name alone, which is insufficient for effective tool selection.

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

Related 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/GongRzhe/ACP-MCP-Server'

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