Skip to main content
Glama

EQVPS — VPS and code sandboxes for AI agents

Poll a background task

get_task
Read-only

Status and NEW output of a background task: state (running | done | failed | killed | timeout), exit_code, and the stdout/stderr text produced since the offsets you pass. Start with offsets 0, then pass stdout_next_offset / stderr_next_offset from the previous response to get only new output. done: true means finished. Poll every few seconds; each call is quick. Up to 8 MiB per stream is retained (older output is dropped and reported in *_dropped). Requires: token.

Input Schema

NameRequiredDescriptionDefault
task_idYesRequired. Task id returned by run_code / exec_command with background: true.
sandbox_idYesRequired. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. "sb_3f2a…".
stderr_offsetNoOptional. Byte offset in stderr to read from, integer ≥ 0 (default 0); pass `stderr_next_offset` from the previous response.
stdout_offsetNoOptional. Byte offset in stdout to read from, integer ≥ 0 (default 0); pass `stdout_next_offset` from the previous response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / sandbox_id / description
      Previous value: -"Sandbox id as returned by create_sandbox / list_sandboxes, e.g. \"sb_3f2a…\"."New value: +"Required. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. \"sb_3f2a…\"."
    • addedInput schema / properties / stderr_offset / description
      Added value: +"Optional. Byte offset in stderr to read from, integer ≥ 0 (default 0); pass `stderr_next_offset` from the previous response."
    • addedInput schema / properties / stdout_offset / description
      Added value: +"Optional. Byte offset in stdout to read from, integer ≥ 0 (default 0); pass `stdout_next_offset` from the previous response."
    • changedInput schema / properties / task_id / description
      Previous value: -"Task id returned by run_code / exec_command with background: true."New value: +"Required. Task id returned by run_code / exec_command with background: true."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, and the description adds genuinely useful context beyond them: an 8 MiB per-stream retention cap with older output dropped and reported in *_dropped, the token requirement, and the low per-call cost. It stops short of explaining behavior for invalid offsets or already-collected tasks.

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?

One dense paragraph that front-loads what the tool returns and follows with the polling procedure, retention limit, and auth note. Every clause carries information, though the offset instructions partially duplicate the schema wording.

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?

There is no output schema, so the description must carry the return shape — and it does, naming state values, exit_code, done, the stdout/stderr payloads, and the *_dropped fields. Combined with the offset protocol and retention cap, an agent has everything needed to call and interpret it.

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 description coverage is 100%, and the schema already documents offset defaults ≥ 0 and the next_offset handoff pattern, so the description largely restates what is structured. It adds only marginal framing (the 0-start convention and the ordering of poll iterations), so baseline 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?

States a specific verb+resource ('Status and NEW output of a background task') and immediately scopes it with the field list it returns (state, exit_code, stdout/stderr). This distinguishes it cleanly from kill_task (terminates), exec_command/run_code (start work), and get_sandbox (sandbox-level status).

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

Usage Guidelines4/5

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

Gives concrete operational guidance: start with offsets 0, then feed back stdout_next_offset/stderr_next_offset, and poll every few seconds. It does not name sibling alternatives (e.g. kill_task for cancellation) or state what happens when polling a task that already finished, so it falls just short of explicit when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.