Skip to main content
Glama

agent_run

Run tasks via an autonomous agent that plans locally, executes tools, and falls back to a stronger model on low confidence or failure. Control execution with iteration and time limits.

Instructions

Run a task through the Needle agent runtime: plans with the local model, executes tools via the workflow orchestrator, escalates to OpenRouter only on low confidence or failure. Requires MITOSIS_AGENT_ENABLED=true and a fetched engine (npm run needle:fetch).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe task or objective for the agent to accomplish
maxToolCallsNoMaximum tool executions per run
maxIterationsNoMaximum agent decide-act-observe iterations
maxExecutionMsNoMaximum run wall-clock time in milliseconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does this well by revealing the planning mechanism, tool execution path, escalation policy, and environmental requirements. However, it does not mention potential side effects of executing arbitrary tools, the eventual return value, or failure behavior, which keeps it from being fully transparent.

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 two sentences with no filler. The first sentence front-loads the core action and execution model, while the second delivers essential setup requirements. Every clause adds information, keeping the definition tight and scannable.

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?

The tool is complex—agent runtime, external escalation, multiple execution limits, and no output schema—so the description should explain what the agent returns or how results are delivered. It explains the pipeline and prerequisites but remains silent on output format, error handling, and whether execution is synchronous or cancellable. This is a notable gap given the tool's complexity.

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 has 100% parameter description coverage; task, maxToolCalls, maxIterations, and maxExecutionMs all have descriptive text. The description itself adds no parameter-specific meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.

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 begins with a specific verb-resource pair ('Run a task through the Needle agent runtime') and then details the execution pipeline: planning with the local model, executing tools via the workflow orchestrator, and escalating to OpenRouter only on low confidence or failure. This clearly differentiates it from sibling tools like llm_query (single query) and workflow_orchestrator (orchestration layer), making the tool's role unambiguous.

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

Usage Guidelines3/5

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

The description provides clear context on how the tool operates and states prerequisites (MITOSIS_AGENT_ENABLED=true, fetched engine), but it never explicitly says when to choose this tool over alternatives or when not to use it. The intended use is implied as multi-step autonomous tasks that benefit from planning and tool execution, but no sibling comparisons or exclusion conditions are given.

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