Skip to main content
Glama
ginkida

portainer-mcp

by ginkida

portainer_container_logs_grep

Search container logs for lines matching a regex pattern, returning only matches with optional context to find errors or keywords without downloading full logs.

Instructions

Search container logs for lines matching a regex pattern.

Returns only matching lines (with optional context). Useful for finding specific errors, status codes, or keywords without downloading the full log.

Args: container_id: Container ID or name pattern: Regex pattern to search for (case-insensitive) tail: Number of log lines to fetch before filtering (default 500, max 1000) context_lines: Lines of context around each match (default 0, max 5) endpoint_id: Target endpoint ID (uses default if omitted)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
container_idYes
patternYes
tailNo
context_linesNo
endpoint_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It describes returning only matching lines with optional context, and explains parameters like tail and context_lines. It does not mention performance or auth, but the behavior is straightforward.

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 is concise, with a brief introductory paragraph followed by a bullet list of parameters. No unnecessary words.

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?

Given that an output schema exists, the description does not need to explain return values. It covers purpose, parameters, and usage context sufficiently.

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?

Schema has 0% description coverage, but the description provides clear explanations for all parameters, including defaults and limits (tail: default 500, max 1000; context_lines: default 0, max 5). This adds significant value.

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 description clearly states the tool searches container logs for lines matching a regex pattern and returns matching lines. It distinguishes from sibling 'portainer_container_logs' which likely returns full logs.

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 mentions it is useful for finding specific errors, status codes, or keywords without downloading full logs, providing good context. However, it does not explicitly state when not to use it or directly compare to the full log tool.

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

Install Server

Other Tools

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/ginkida/portainer-mcp'

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