Skip to main content
Glama
OpenCyber Harness
by mitkox

oc_grep

Destructive

Search text files in a selected engagement with GNU grep, using relative paths for artifacts. Use it for plain-text pattern matching; choose structured or custom parsing tools for JSON and code.

Instructions

Search text files inside the selected engagement with GNU grep. Prefer oc_jq for structured JSON and oc_python for custom parsing. Runs from the selected engagement namespace; use relative paths for engagement artifacts.

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": {
      "engagement_id": "<engagement_id>",
      "arguments": "<arguments>"
    },
    "name": "oc_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
stdinNo
argumentsYes
engagement_idYes
working_directoryNo.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

Annotations declare readOnlyHint=false and destructiveHint=true, yet the description sells the tool as a plain text search and never warns that the free-form 'arguments' array is executed as grep flags, that stdin can be piped in, or that arbitrary paths can be targeted. It does add the useful detail that execution happens in the engagement namespace with relative paths, but the risk profile implied by the annotations is left undisclosed.

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?

Three short sentences, each doing distinct work: purpose, sibling routing, execution context. The purpose is front-loaded and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, but the tool takes a free-form grep argument array plus stdin with zero schema coverage, and the description explains neither syntax nor constraints. For a tool that executes arbitrary flags in a namespace, the definition is under-specified relative to its complexity.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, so the description must carry the burden and largely does not. Only 'working_directory' is indirectly illuminated ('use relative paths for engagement artifacts'); 'arguments', 'stdin', and 'engagement_id' get no explanation of format, allowed flags, or interaction.

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 ('Search text files') plus the underlying engine (GNU grep) and the scope ('inside the selected engagement'). It also names two siblings it is not, so an agent can distinguish it from oc_jq and oc_python without opening either 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?

Explicitly routes the agent: use oc_jq for structured JSON and oc_python for custom parsing, which gives a clear use-this-instead rule. It also states the execution root ('runs from the selected engagement namespace; use relative paths'). It stops short of explicit exclusions such as binary files or large-file/pagination concerns.

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

Deploy Server

Other Tools