Skip to main content
Glama

instance_job

Monitor background jobs started by instance_exec: check running/exited status and exit codes, tail logs, and stop processes with TERM then KILL.

Instructions

管理 instance_exec(background=true) 启动的任务。 action=status:运行中/已退出+退出码(需 log_file 读 .exit)+进程信息; action=logs:tail 日志(需 log_file);action=stop:先 TERM 后 KILL(进程组)。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "pid": "<pid>"
    },
    "name": "instance_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYes
tailNo
actionYes
log_fileNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral detail: status requires log_file to read the .exit sentinel for the exit code, and stop escalates from TERM to KILL against the process group, which signals a destructive, escalating termination. It does not state what happens if the pid is already dead or whether the caller needs special permissions, leaving some gaps.

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?

The description is short, front-loads the tool's scope, then uses a semicolon-separated per-action list that is easy to scan. Nearly every clause carries information; only the parenthetical phrasing requires extra parsing.

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?

For a four-parameter mutation-and-inspection tool with zero annotation coverage and no output schema, the description covers the core mode semantics and the exit-code dependency well. It is still missing pid semantics, the tail parameter, return-shape cues for each action, and error behavior, so it is adequate rather than 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 description coverage is 0%, so the description must compensate. It usefully supplies the otherwise-missing semantics of `action` (status/logs/stop) and the conditional dependency of `log_file` on those modes, which the schema does not convey at all. But it says nothing about `pid` (raw pid vs process group) or `tail` (default 100, applying only to logs), so two of four parameters remain undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (tasks launched by instance_exec with background=true) and enumerates three concrete operations: status, logs, and stop. An agent can tell it is the control-plane for background jobs rather than a general log reader. It stops short of five because the relationship to siblings like instance_logs and instance_status is not explicitly disambiguated.

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?

It gives clear intra-tool routing: use action=status for liveness/exit code, action=logs to tail output, action=stop to terminate. However, there is no explicit statement of when to prefer this tool over instance_logs or instance_status, so cross-tool selection is left to inference.

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