Skip to main content
Glama

md_grep

Read-only

Returns every line of a Markdown field containing a fragment, with line numbers and surrounding lines ("12:line" - a match, "11-line" - context, groups separated by --), plus { total, truncated, sha }.

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": {
      "entity": "<entity>",
      "field": "<field>",
      "query": "<query>"
    },
    "name": "md_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
IDNoEntity ID; a task or feature can also be addressed by key.
keyNoTask number or feature key (#F12) when the ID is unknown.
fieldYesspec; result for a task; notes for a version.
queryYesA literal fragment; case-insensitive by default.
entityYestask (a task or bug), feature, product or version.
contextNoLines around each match, 2 by default.
caseSensitiveNoCase-sensitive search.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the exact line-oriented output format with group separators and the existence of total, truncated, and sha markers, which signals truncation is possible. It stops short of explaining what triggers truncation or whether sha can be used for change detection.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

A single dense sentence that front-loads the tool's action and then parenthetically defines the output format. Every clause carries information, though the embedded format explanation makes it slightly hard to scan in one pass.

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?

With 7 parameters, full schema coverage, and no output schema, the description appropriately compensates by describing return values and the truncation flag. What remains thin is guidance on the entity/ID-versus-key addressing choice and what to do when truncated is true, but these are minor given the rich schema.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented, including enum meanings, defaults (context=2), and case-insensitivity. The description's mention of 'surrounding lines' and 'case-insensitive by default' only echoes schema content rather than adding new meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: returns every line of a Markdown field containing a fragment. It also names the output shape (line numbers plus context lines), which makes the search-with-context nature unambiguous. It does not explicitly contrast with siblings like md_read or md_patch, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied by the word 'containing a fragment' — an agent can infer this is a literal search rather than a full read. However, there is no explicit statement of when to prefer this over md_read or md_patch, and no note on prerequisites or on handling results when total/truncated indicate more data exists.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources