Skip to main content
Glama

run_acp_agent

Run an ACP agent with specified input text and mode to enable communication between ACP-based AI agents and MCP-compatible tools via the ACP-MCP-Server.

Instructions

Execute an ACP agent with specified mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_nameYes
input_textYes
modeNosync
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'run_acp_agent' tool. Decorated with @mcp.tool(), it orchestrates ACP agent execution in sync or async modes using the RunOrchestrator class.
    async def run_acp_agent(
        agent_name: str,
        input_text: str,
        mode: str = "sync",
        session_id: str = None
    ) -> str:
        """Execute an ACP agent with specified mode"""
        
        try:
            if mode == "sync":
                run = await orchestrator.execute_agent_sync(agent_name, input_text, session_id)
                
                if run.status == RunStatus.COMPLETED:
                    # Convert output back to readable format
                    if run.output:
                        # Handle ACP output 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"
                        return output_text.strip() if output_text else "Agent completed with no text output"
                    else:
                        return "Agent completed with no output"
                else:
                    return f"Error: {run.error}"
            
            elif mode == "async":
                run_id = await orchestrator.execute_agent_async(agent_name, input_text, session_id)
                return f"Started async run with ID: {run_id}"
            
            else:
                return f"Unsupported mode: {mode}. Use 'sync' or 'async'"
                
        except Exception as e:
            return f"Error: {e}"
  • Registration of the orchestrator tools, including 'run_acp_agent', by calling register_orchestrator_tools on the FastMCP 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 full burden for behavioral disclosure. It mentions 'specified mode' but doesn't explain what modes are available, whether execution is synchronous/asynchronous, what permissions are needed, or what side effects occur. For a tool that likely performs operations, this minimal description fails to provide adequate behavioral context.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action, though it could be more structured by explicitly listing key parameters or outcomes. The brevity is appropriate but borders on under-specification given the tool's complexity.

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

Completeness2/5

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

Given the tool has 4 parameters, no annotations, 0% schema coverage, but an output schema exists, the description is incomplete. It doesn't explain what the tool returns, how errors are handled, or the operational context. The output schema mitigates some gaps, but the description fails to provide enough context for safe and effective use.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description only vaguely references 'specified mode', adding minimal meaning beyond the parameter names. It doesn't explain what 'agent_name' refers to, what 'input_text' should contain, or the purpose of 'session_id'. With 4 parameters, this is insufficient compensation for the lack of schema documentation.

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 'Execute an ACP agent with specified mode' states the action ('Execute') and resource ('ACP agent'), but it's vague about what execution entails and doesn't differentiate from sibling tools like 'start_interactive_agent' or 'smart_route_request'. It provides a basic purpose but lacks specificity about what ACP agents are or what execution involves.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone. With sibling tools like 'start_interactive_agent' and 'smart_route_request' that might overlap, this lack of guidance is a significant gap.

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