Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NAR_HOMENoHome directory for NAR; defaults to ~/.native-agent-router. Used to locate agents.json.
ZCODE_BINNoPath to the ZCode binary (zcode.cjs), used for ZCode adapter discovery.
NAR_CONFIGNoPath to the NAR configuration file. Used when the --config flag is not provided.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
agentsA

List configured worker agents and their capabilities (adapter type, transport, native session resume support, usage accounting quality) plus per-agent SCORE STATS (avg_score, success_rate, repair_rate, out_of_scope_rate, blocked_rate, avg_tokens, median_duration_sec, last_tasks). Use the stats to route work: high-score agents for hard units, cheaper/lower-score agents for well-specified mechanical units. Use this before run() to pick a valid agent_id.

runA

Submit a complete work unit to a worker agent and return its task_id.

Requirements:

  • agent_id: exact id from agents(); every task is explicitly bound to one agent.

  • goal: full objective, constraints and context in ONE prompt (complete work unit; do not ping-pong per file/line).

  • workspace: directory path (canonicalized to an absolute path by the kernel).

  • scope_files: RELATIVE paths the worker may modify (absolute or escaping paths are rejected; enforced by diff audit).

  • forbid: extra prohibitions.

  • verify: commands executed by the kernel after the turn; the worker cannot pass by editing them. Prefer list form; string form is arg-split (no shell) unless config verify_allow_shell is on. Exit code 0 = pass.

  • mode: adapter-specific permission mode (zcode: plan|build|edit|yolo).

  • session_ref: task_id of a previous task on the SAME agent+workspace to continue its native session. Cross-agent/workspace reuse is rejected.

  • timeout_sec: per-turn timeout; on timeout the task becomes blocked (never silently resubmitted; the lock is held and a watcher keeps observing).

  • wait_sec: bounded block until finish (default: return immediately).

  • budget_tokens: hard token budget; exceeded -> task failed (budget_exceeded).

  • permission_policy: "deny" (default) or "allow" (auto-allow within this task).

  • repair_allowed: one pre-authorized targeted repair attempt (default true).

  • idempotency_key: resubmitting the same key returns the original task.

Returns a snapshot dict with ok/status/code. A run() success only means SUBMITTED, not done — follow with wait()/inspect().

waitA

Bounded blocking wait for a task to reach a terminal or blocked state. Does not busy-poll. Returns the snapshot dict; if it still runs when the timeout expires, wait_timed_out=true — call again later. 'submitted'/'running' is NOT completion; only status succeeded/failed/blocked/cancelled/interrupted is.

inspectA

Read task details on demand (logs/diffs stay on disk; read slices here). what: status | summary | diff | verify | log | raw | usage | diagnose.

  • diagnose returns a compact SANITIZED report (secrets/emails/blobs redacted, size-bounded) with a stable code and actionable hints — safe to share.

cancelA

Request cancellation and report whether the stop was CONFIRMED by the native runtime (confirmed=true only on an observed terminal/exit). A cancel request alone is not a stop.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/BerineYang/native-agent-router'

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