Skip to main content
Glama
auspham

Copilot Memory MCP

by auspham

monitor_command

Poll a shell command at regular intervals, capture output snapshots, and stop automatically on pattern match, output change, or exit code to track long-running tasks.

Instructions

Run a shell command repeatedly and collect output over time.

USE THIS instead of running commands in a loop yourself — it handles
the polling so you don't burn through your iteration limit.

Examples:
    - Monitor a build: command="kubectl get pods", stop_pattern="Running"
    - Watch a deploy: command="curl -s http://localhost:8080/health", stop_pattern="ok"
    - Track a job: command="squeue -u $USER", stop_pattern="", stop_on_change=true
    - Wait for completion: command="cat /tmp/job.status", stop_pattern="DONE"

Args:
    command: Shell command to run each interval.
    interval_seconds: Seconds between each run (default 10, min 2).
    timeout_seconds: Max total seconds to monitor (default 300 = 5 min, max 3600).
    stop_pattern: Regex pattern — stop early when output matches this. Leave empty to run until timeout.
    stop_on_change: Stop when output changes from the first run.
    stop_on_exit_code: Stop when command returns this exit code (default -999 = disabled).
    max_snapshots: Max number of output snapshots to keep (default 50). Older ones are dropped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
stop_patternNo
max_snapshotsNo
stop_on_changeNo
timeout_secondsNo
interval_secondsNo
stop_on_exit_codeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.5/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 of behavioral disclosure, and it delivers: recurring execution, early stopping via regex, change detection, exit-code stopping, timeouts, intervals, and snapshot dropping. Minor gaps such as error handling for failed commands and whether stderr is captured prevent a perfect score, but the core behavior is clearly portrayed.

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 opens with a one-sentence purpose, follows with an emphasized usage guideline, then gives four helpful examples, and closes with per-parameter explanations. Every section earns its place, and the structure is skimmable and front-loaded.

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?

Given the tool's complexity, the description covers all seven parameters, gives use cases, and explains stopping behavior thoroughly. Since an output schema exists, omitting return-format details is acceptable. The only shortfall is not mentioning shell environment, time-out behavior details, or error cases, which would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero descriptions, but the Args block provides meaningful semantics for every parameter, including defaults, min/max bounds, and the meaning of stop_on_change, stop_on_exit_code, and max_snapshots. This fully compensates for the schema's lack of parameter documentation.

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 first sentence states a specific verb and resource: 'Run a shell command repeatedly and collect output over time.' This clearly distinguishes the tool from siblings like watch_file, poll_url, and run_long_command, which do not generically repeat arbitrary shell commands.

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?

The description explicitly directs agents to 'USE THIS instead of running commands in a loop yourself — it handles the polling so you don't burn through your iteration limit.' This gives a strong when-to-use signal, and the examples reinforce realistic scenarios. It does not, however, name sibling alternatives like watch_file or poll_url or state when not to use this tool.

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

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/auspham/copilot-memory-mcp'

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