Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

Grep an Octopus task activity log

grep_task_log
Read-onlyIdempotent

Search task activity logs for specific patterns using grep-style filtering. Return only matching lines with optional surrounding context.

Instructions

Search a server task's activity log with grep-style semantics. Returns only matching lines (with optional symmetric context windows). This is the canonical way to inspect task logs — there is no full-log resource URI, because exposing one would tempt callers to inhale multi-megabyte bodies when grep is almost always the better primitive.

Use this when you know what to look for (a specific error string, a step name, a pattern). For structured access to the activity tree (step hierarchy, categories, timing) use the octopus://spaces/{spaceName}/tasks/{taskId}/details resource instead.

Parameter conventions mirror GNU grep so the schema is self-explanatory:

  • pattern (regex by default; set fixedString:true for literal text)

  • caseInsensitive (-i)

  • invertMatch (-v)

  • fixedString (-F)

  • beforeContext (-B)

  • afterContext (-A)

  • maxCount (-m)

Response includes totalMatches (true count across the whole log), totalLines, the matched lines with 1-indexed lineNumber, optional before/after context arrays, and a taskDetailsResourceUri for the structured fall-through.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceNameYesOctopus space name. Case-sensitive.
taskIdYesServerTasks-XXXX ID. Use find_releases or list_deployments to discover task IDs from their parent entities.
patternYesRegex (default) or literal substring (when fixedString=true). Anchors and groups behave as in JavaScript RegExp. Tested against each log line independently — the same model as `grep`.
caseInsensitiveNoEquivalent to grep -i. Default false.
invertMatchNoEquivalent to grep -v: return lines that do NOT match. Default false.
fixedStringNoEquivalent to grep -F: treat pattern as a literal substring, not a regex. Use this when grepping for text containing regex metacharacters. Default false.
beforeContextNoEquivalent to grep -B: lines of preceding context to include with each match. Capped at 50.
afterContextNoEquivalent to grep -A: lines of trailing context to include with each match. Capped at 50.
maxCountNoEquivalent to grep -m: stop returning matches after this many. totalMatches in the response still reflects the true count across the whole log. Hard cap 500.
stripPrefixesNoStrip the timestamp/level prefix (e.g. `04:36:40 Fatal | `) from each line before pattern matching AND in the returned line/context text. Default false. Turn this on when greping for words that collide with level names (Fatal, Error, Warn) or when you want clean message-only output. Note: when on, your pattern will not match against the prefix — searching for `Fatal` won't find Fatal-level lines.
Behavior5/5

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

Annotations already indicate read-only, non-destructive, idempotent behavior. The description adds valuable context: returns only matching lines with context, response structure (totalMatches, totalLines, line numbers, context arrays, taskDetailsResourceUri), and parameter behavior. No contradictions.

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 yet thorough: two paragraphs cover purpose, usage guidelines, and parameter conventions. Every sentence adds necessary information without redundancy, demonstrating excellent structure.

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 the tool's complexity (10 parameters, no output schema), the description is fully complete. It explains the response structure, parameter semantics, and usage context, leaving no gaps for an AI agent to misinterpret.

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 already covers all parameters with detailed descriptions. The description adds further value by drawing parallels to GNU grep flags, explaining regex behavior, and clarifying nuanced options like stripPrefixes, going beyond what the schema provides.

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 identifies the tool's function: searching a server task's activity log with grep-style semantics. It explicitly distinguishes from related tools like get_task_from_url and the details resource, ensuring no ambiguity.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance ('Use this when you know what to look for') and an alternative ('For structured access... use the details resource'). Also explains why a full-log resource is absent, reinforcing correct usage.

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/OctopusDeploy/mcp-server'

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