Skip to main content
Glama

mcp_aql_execute

Destructive

Control the execution lifecycle of agents, workflows, and pipelines: start runs, approve pending operations, resume paused tasks, abort unwanted executions, and transfer progress across sessions.

Instructions

Execution lifecycle operations for executable elements (agents, workflows, pipelines).

Supported operations: confirm_operation, approve_cli_permission, execute_agent, complete_execution, continue_execution, abort_execution, prepare_handoff, resume_from_handoff

These operations manage runtime execution state. Unlike CRUD operations (which manage definitions), Execute operations handle the execution lifecycle:

  • execute_agent: Start a new execution (returns goalId and stateVersion for tracking)

  • complete_execution: Signal successful completion once the goal is done

  • continue_execution: Resume a previously paused execution with the same goal parameters

  • abort_execution: Abort a running execution, rejecting further operations

  • confirm_operation: Confirm a pending operation that requires user approval (Gatekeeper flow)

  • approve_cli_permission: Approve a pending CLI tool permission request

  • prepare_handoff: Serialize goal progress into a portable handoff block for session transfer

  • resume_from_handoff: Resume agent execution from a handoff block with integrity validation

IMPORTANT: Execute operations are potentially destructive (agents can perform any action) and non-idempotent (calling execute_agent twice creates two separate executions).

⚠️ SECURITY: Do not auto-allow this endpoint in your host settings (e.g., Claude Code settings.json). Each execution should require explicit human approval. Auto-allowing bypasses the per-operation confirmation gate. While DangerZone verification and element deny policies still provide protection, the primary human review checkpoint is lost.

Canonical loop:

  1. Call execute_agent once to start the goal and receive { goalId, stateVersion, activeElements, safetyTier, ... }.

  2. After each chunk of work, use mcp_aql_create: { operation: "record_execution_step", ... }.

  3. Read record_execution_step.autonomy.continue and any autonomy.notifications to decide whether to continue, pause for a human, or handle a gatekeeper block.

  4. When the goal is finished, call complete_execution. Use continue_execution only when an already-started goal was paused and you are resuming it with the same goal parameters. It is not the normal next call after execute_agent.

Quick start examples: { operation: "execute_agent", params: { element_name: "code-reviewer", parameters: { objective: "Review code" } } } Next lifecycle step — use mcp_aql_create: { operation: "record_execution_step", params: { element_name: "code-reviewer", stepDescription: "Reviewed auth module", outcome: "success", findings: "Found 2 security issues" } } { operation: "complete_execution", params: { element_name: "code-reviewer", outcome: "success", summary: "Completed review" } } { operation: "abort_execution", params: { element_name: "data-collector", reason: "User requested cancellation" } } { operation: "continue_execution", params: { element_name: "rubric-qa-agent", previousStepResult: "Verified citation set", parameters: { run_dir: "/app/run", deliverable_path: "/app/run/output.docx" } } } { operation: "confirm_operation", params: { operation: "execute_agent" } } { operation: "approve_cli_permission", params: { request_id: "req-123", decision: "allow" } } { operation: "prepare_handoff", params: { element_name: "code-reviewer" } } { operation: "resume_from_handoff", params: { element_name: "code-reviewer", handoff_block: "..." } }

Discover required parameters — use mcp_aql_read: { operation: "introspect", params: { query: "operations", name: "execute_agent" } }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoOperation parameters
operationYesOperation name to execute
operationsNoArray of operations for batch execution
element_typeNoTarget element type (optional)
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description goes far beyond that by disclosing that executions are potentially destructive, non-idempotent, and require human approval. It even warns against auto-allowing the endpoint in Claude Code settings, preserving a security checkpoint that is not inferable from annotations. It also discloses execute_agent's return fields and abort semantics.

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 long but appropriately structured for the complexity: purpose, supported operations, security warning, canonical loop, and quick-start examples. Each section contributes non-redundant information an agent cannot get from annotations or the schema. Important constraints like 'continue_execution is not the normal next call' are front-loaded in the workflow.

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 eight operations, a destructive/non-idempotent profile, nested params, and no output schema, the description is remarkably complete. It covers the full lifecycle, gatekeeper approval flow, CLI permission approval, handoff serialization and validation, abort behavior, and the exact return fields of execute_agent. It also tells the agent where to look for remaining parameter details.

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

Parameters4/5

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

Schema coverage is 100% for top-level parameters, so the baseline is 3. The description adds meaningful per-operation parametrization through concrete examples (element_name, parameters, objective, outcome, request_id, decision, handoff_block, previousStepResult). It does not exhaustively document every nested param, but it tells the agent to use mcp_aql_read introspect to discover required parameters, which is an acceptable complement.

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, accurate statement: 'Execution lifecycle operations for executable elements (agents, workflows, pipelines).' It enumerates all eight supported operations and explicitly contrasts Execute operations with the CRUD siblings, so an agent can distinguish mcp_aql_execute from mcp_aql_create/read/update/delete without inspecting schemas.

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 canonical loop provides a precise execution sequence: execute_agent first, then record_execution_step via mcp_aql_create, then continue or complete. It explicitly warns that continue_execution is not the normal next call after execute_agent and should only be used when resuming a paused goal with the same parameters. It also points to mcp_aql_read for introspecting required parameters.

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/DollhouseMCP/mcp-server'

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