Skip to main content
Glama
xenmcp-docker-agent

xenmcp-docker-agent

container_logs

Read-only

Fetch and filter Docker container logs by tail count, time window, stdout/stderr, and text search to diagnose issues and page back through older entries.

Instructions

Log lines of one container with timestamps, newest last: the last N lines, a time window (since/until: 15m, 6h, 2d or an ISO time), stdout or stderr only, and a text search (contains; regex with regex: true). At most 500 lines per call; page back with until.

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": {
      "container": "<container>"
    },
    "name": "container_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
tailNo
regexNo
sinceNo
untilNo
streamNoboth
containsNo
containerYesContainer name (as in list_containers) or id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, closed-world behavior, and the description adds genuinely new traits: ordering (newest last), a hard 500-line cap per call, and the paging workflow. It does not cover streaming/follow behavior or error cases, which keeps it below 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence front-loads the resource and then enumerates the capabilities in the same order an agent would consider them, with the paging limit last. No filler or redundancy.

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 7-parameter read tool with no output schema, the description covers format syntax, ordering, caps, and pagination well. Remaining gaps are minor defaults (tail=100, stream=both) and behavior for a nonexistent container.

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

Parameters4/5

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

Schema coverage is only 14%, so the description must carry the load, and it does: it explains tail ('last N lines'), since/until formats ('15m, 6h, 2d or an ISO time'), stream ('stdout or stderr only'), contains ('text search'), and regex ('regex: true'). Defaults such as stream=both and regex=false are implied rather than stated, so it is not a 5.

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 and resource ('Log lines of one container') plus the scope details (timestamps, newest last). An agent can distinguish it from container_stats, inspect_container, and recent_events without opening any schema.

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 clear operational guidance for pagination ('At most 500 lines per call; page back with until') and implies when to use the filters. It stops short of explicitly contrasting with siblings like recent_events, so it is clear context without exclusions.

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