Skip to main content
Glama

run_local_agent

Delegate low-complexity or bulk tasks like searching, transforming, and summarizing files to a local subagent that runs its own tool loop, returning a compact answer and staged-write IDs without polluting your context.

Instructions

Delegate a low-complexity task to the LOCAL SUBAGENT: the cheap model runs its own tool loop (read_file, list_dir, search_files, stage_write, whitelisted run_command, plus any registered dynamic tools) entirely server-side. File contents and intermediate steps never enter your context — you get back a compact final answer + staged-write op ids to review. Use for mechanical, monotonous, or bulk work: finding things, transforming files, answering questions over many files. Do NOT delegate work needing real reasoning, security judgment, or architecture decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesSelf-contained task description. The local agent sees ONLY this text + optional context/files — include paths, names, and exactly what to return.
filesNoFile paths to read server-side and inline into the task (contents bypass your context). Keep this small — it consumes the local model's context window.
modelNo
pathsNoFile/dir paths to tell the agent about WITHOUT inlining contents — it reads them via tools as needed. Better for many/large files.
thinkNoChain-of-thought control for the agent's model (ollama `think`). think:false leaves more context/steps for tool calls on thinking models.
verifyNo"self" = a second local pass critiques the result and flags it needs_review if it looks wrong.
contextNoExtra background for the local agent (kept compact).
num_ctxNoContext window for the local model (ollama only). Smaller = less VRAM.
optionsNoProvider-native request overrides (ollama `options` keys / openai body fields).
providerNo
max_stepsNo
run_asyncNotrue = run as a background job; returns job_id immediately, poll get_job for progress + result. false = synchronous, but if the task outlasts config agent_sync_grace_ms the call returns a job_id so the result is never lost. Default: config agent_async.
timeout_sNo
temperatureNo
allowed_toolsNoSubset of local tools to permit, e.g. ["read_file","search_files"]. Default: all built-ins + dynamic tools.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does substantial work: it discloses that execution is entirely server-side, that file contents and intermediate steps never enter the caller's context, and that the return is a compact answer plus staged-write op ids to review. It leaves out some operational details (cost/latency expectations, failure modes, whether staged writes must be committed via commit_write), which keeps it short of a 5.

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?

Two tight sentences front-load the core mechanism and the return contract before the usage rule, with zero filler. Slightly dense but every clause carries information relevant to correct invocation.

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

Completeness4/5

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

For a 15-parameter tool with no output schema, the description adequately covers what the agent must know: execution isolation, the shape of the result, and the delegation boundary. It omits the tuning parameters and the staged-write review/commit workflow, which are handled by sibling tools, but the core mental model is complete.

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?

Schema coverage is 67%, so the schema already documents most parameters including the important task, files, paths, and run_async semantics. The description adds a useful distinction between inlining files versus pointing at paths, but says nothing about model, provider, max_steps, timeout_s, temperature, options, or num_ctx, so it only marginally extends 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?

States a specific verb+resource: delegating a low-complexity task to a local subagent that runs its own server-side tool loop, and names the exact tools it can call (read_file, list_dir, search_files, stage_write, run_command). It is clearly distinguishable from siblings like chat, summarize, and map_files because it describes an autonomous agent loop rather than a single-shot call.

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?

Explicitly names when to use it (mechanical, monotonous, or bulk work: finding things, transforming files, answering questions over many files) and when not to (work needing real reasoning, security judgment, or architecture decisions). This is a complete routing rule an agent can apply without inference.

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