Skip to main content
Glama

akb_grep

Search documents for exact text or regex patterns. Optionally replace matches across all matching documents.

Instructions

Search for exact text or regex patterns across document content. Unlike akb_search (semantic/meaning-based), this finds exact string matches — use it for specific terms, URLs, code snippets, version numbers, etc. Returns matching documents (each with its uri) and matched lines. Optionally pass replace to find-and-replace across all matching documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesSearch pattern. By default matched as literal text (ILIKE) — metacharacters like |, ., *, (), [], +, ? are treated as literal characters. Set regex=true to enable PostgreSQL regex (required for alternation and wildcards).
vaultNoLimit to a specific vault
collectionNoLimit to a specific collection
regexNoTreat pattern as PostgreSQL regex. REQUIRED to use alternation (|), wildcards (.*), character classes, anchors, etc. When false (default), the entire pattern including any metacharacters is matched literally.
case_sensitiveNoCase-sensitive matching (default: case-insensitive)
replaceNoReplacement string. If provided, replaces all matches in EVERY matching document across the search scope (git commit + re-index per doc). Supports regex backreferences (\1, \2) when regex=true. For precise edits to a single known document, prefer akb_edit instead.
limitNoMax documents to return
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that replace performs find-and-replace across all matching documents with git commit and re-index, and explains regex vs literal behavior. Could mention destructive nature more explicitly, but overall clear.

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?

Two sentences: first defines purpose and differentiates, second adds replace feature and guidance. No wasted words, front-loaded.

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?

No output schema, but description states returns 'matching documents (each with its uri) and matched lines.' Covers return structure. Missing pagination or ordering details, but limit parameter covers max docs.

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

Parameters4/5

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

Schema coverage is 100%, but description adds value beyond schema: explains default literal pattern matching, necessity of regex flag for metacharacters, replace side effects (commit+re-index), and preference for akb_edit.

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?

Description explicitly states 'Search for exact text or regex patterns across document content' and contrasts with akb_search (semantic/meaning-based), clearly distinguishing the tool's purpose and resource.

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?

Gives explicit when-to-use context: 'use it for specific terms, URLs, code snippets, version numbers, etc.' and specifies when not to use it by recommending akb_search for semantics and akb_edit for precise single-document edits.

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/dnotitia/akb'

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