Skip to main content
Glama

Search snapshot file contents

src_grep
Read-onlyIdempotent

Use this tool to search stored source for app_id and a regex pattern. Optionally select version, path, glob and case_insensitive; control results with output_mode, context or before_context/after_context, line_numbers, max_file_size and continuation_token. Omitted version reads the latest attempted snapshot. MCP version 2.12.

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": {
      "app_id": "<app_id>",
      "pattern": "<pattern>"
    },
    "name": "src_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
globNoGlob pattern to filter files (e.g., '*.ts')
pathNoDirectory path to search within
app_idYesTarget app id
contextNoLines before and after (overrides before/after_context)
patternYesRegex pattern to search for (max 500 chars)
versionNoVersion to search. Omit to use the latest stored snapshot (last_attempt_version).
mcp_versionNoSet to "2.12", the MCP version in this tool's description. Use this tool's version, not another tool's version.
output_modeNocontent=matching lines, files_with_matches=file paths only, count=match count per filecontent
line_numbersNoInclude line numbers in output
after_contextNoLines to show after each match (0-20)
max_file_sizeNoMax file size to scan in bytes (default 10MB)
before_contextNoLines to show before each match (0-20)
case_insensitiveNoEnable case-insensitive matching
continuation_tokenNoToken from previous response for pagination

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / mcp_version / description
      Previous value: -"Set to \"2.11.7\", the MCP version in this tool's description. Use this tool's version, not another tool's version."New value: +"Set to \"2.12\", the MCP version in this tool's description. Use this tool's version, not another tool's version."
  2. Changed1 schema field changed
    • changedInput schema / properties / mcp_version / description
      Previous value: -"Set to \"2.11.0\", the MCP version in this tool's description. Use this tool's version, not another tool's version."New value: +"Set to \"2.11.7\", the MCP version in this tool's description. Use this tool's version, not another tool's version."
  3. Changed1 schema field changed
    • addedInput schema / properties / mcp_version
      Added value: +{
      +  "description": "Set to \"2.11.0\", the MCP version in this tool's description. Use this tool's version, not another tool's version.",
      +  "maxLength": 32,
      +  "minLength": 1,
      +  "pattern": "^\\d+\\.\\d+(?:\\.\\d+)?$",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / version / description
      Previous value: -"Version to search (defaults to applied version)"New value: +"Version to search. Omit to use the latest stored snapshot (last_attempt_version)."
  5. Changed1 schema field changed
    • changedInput schema / properties / version / description
      Previous value: -"Version to search. Omit to use the latest stored snapshot (last_attempt_version)."New value: +"Version to search (defaults to applied version)"
  6. Changed1 schema field changed
    • changedInput schema / properties / version / description
      Previous value: -"Version to search (defaults to applied version)"New value: +"Version to search. Omit to use the latest stored snapshot (last_attempt_version)."
  7. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuine context beyond that: the default-to-latest-snapshot behavior for omitted version, the 10MB default scan ceiling, the context-overrides-before/after precedence, and the MCP version stamp requirement. It does not disclose result ordering or pagination semantics beyond mentioning continuation_token.

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

Conciseness3/5

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

Purpose is front-loaded in the first sentence, which is good. The second sentence degenerates into a comma-separated inventory of parameter names that duplicates the schema, and the trailing 'MCP version 2.12' note is awkwardly placed without explaining why the agent must echo it.

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

Completeness3/5

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

With 14 parameters, no output schema, and annotations covering safety, the description is serviceable but thin on return values: it never says what a match record looks like, how counts are presented, or how continuation tokens are issued. The output_mode enum in the schema carries most of that burden, but a tool with no output schema would benefit from a sentence on result shape.

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 coverage is 100%, so every parameter is already documented in the schema, including the context precedence rule and the version fallback. The description largely restates the parameter list rather than adding semantics, so the baseline 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?

States a specific verb and resource ('search stored source for app_id and a regex pattern'), which clearly separates it from mutation siblings like deploy_app or delete_app. It does not explicitly name the closest siblings (src_glob, src_read), so an agent must infer that grep searches content while read/glob retrieve files, but the core purpose is unambiguous.

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?

It gives a real usage rule — 'Omitted version reads the latest attempted snapshot' — and implies the optional narrowing knobs. However, there is no guidance on when to use this versus src_glob or src_read, which is the most likely selection confusion among siblings, and no stated prerequisites for app_id validity.

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