Skip to main content
Glama

aft_grep

Search indexed project files by regex and return matching file paths with line numbers; paginate large result sets using offset.

Instructions

AFT indexed grep (read-only). Regex search with file paths and line numbers; paginate with offset.

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

Input Schema

NameRequiredDescriptionDefault
pathNo
offsetNo
includeNo
patternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description does useful work by declaring "read-only" and by stating the return shape (file paths and line numbers) and pagination mechanism (offset). It says nothing about index freshness or re-indexing, project scoping despite the aft_use_project sibling, permission/auth needs, or what happens when no match is found.

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?

Two short sentences, front-loaded with the read-only guarantee and free of filler. It is arguably over-compressed for a four-parameter tool with zero schema documentation, but nothing present is wasted.

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?

No annotations and no output schema mean the description bears the full burden for a four-parameter search tool. Two undocumented parameters, no sibling differentiation, and no index/scoping behavior leave real gaps an agent would hit on first use.

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%, so the description must carry all parameter meaning. It clarifies that pattern is a regex and that offset paginates, but leaves path (search root?) and include (glob filter?) completely unexplained, so half the parameters remain opaque.

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?

"Regex search with file paths and line numbers" gives a specific verb and resource, and "indexed" plus "grep" signals a code-search tool. However, it never distinguishes itself from siblings like aft_search or aft_glob, so an agent comparing them has no stated boundary.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives; the only implicit usage cue is "paginate with offset". The agent must infer that this is for regex content matching rather than filename matching (aft_glob) or semantic search (aft_search).

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