Skip to main content
Glama

Search the documents

grep
Read-onlyIdempotent

Search the text of every document postalref holds, or of one, for the pages that say the words, best first: those that say them as a phrase, then by how much of the page they are and how many of them it says side by side or close together, a table of contents last. A court's filing or a Justice Department release about a fraud case comes after USPS's own pages when one of those says every word, as Publication 52 and a release about a bulk mail fraud both say bulk mail permit; a case's name finds its records first. A document gives at most three pages while other documents' pages fill the list, and more gives each document a hit is from that has more pages with the words, and how many: grep again with /documents/ as path to rank only its pages. A page needn't have the words a question asks with, such as how, get or take. Each word is found in its forms, and a name also as the registry's other names for it, BCG for Business Customer Gateway or Post Office Box for PO Box, and a size as 4x6 or 4 x 6; a hit another wording found gives it as by. Each hit gives the path and page read reads, and the passage that says most of the words. Use it when no title names what you're looking for, as for a price in the Mail Classification Schedule or a rule in a DMM chapter. With /documents as path, it searches every document on PostalPro by title and file name instead, with its page and newest file, and the product pages and downloads postalref holds by title; each one postalref holds the text of carries the path read takes. A hit's context is a whole sentence, list or row of the page unless it starts or ends with …: quote it with the hit's id and page, or read its path at that page for the sentences around it. When no hit answers, grep again with the words an answer would say. A title says only that USPS publishes a document: read one grep lists to learn what it says.

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": {
      "query": "<query>"
    },
    "name": "grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoWhere to look: /documents/<id>, one document's pages, every one that says the words up to `limit`; or /documents, the titles of every PostalPro document and of the documents postalref holds. Every page of every document postalref holds when absent.
limitNoAt most this many; 10 when absent.
queryYesWords a page says: a price, a rule, a size, a name. Each word is found in its forms: one or many, -ed, -ing, -able, -ous. With /documents: words from a document's title or file name.
topicNoWith /documents: only documents a model put under this topic.

Output Schema

NameRequiredDescriptionDefault
pagesNo
titlesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses a lot: relevance ordering (phrase match, coverage, proximity), a three-page-per-document cap, that `more` reports remaining pages, morphological and registry-alias expansion, and `by` for alternate-word hits. Some of these disclosures are grammatically mangled ('`more` gives each document a hit is from that has more pages'), so the value is partially lost in transmission.

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

Conciseness2/5

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

Roughly three hundred words in an intentionally archaic register, with ranking rules, synonym expansion, context formatting, and retry advice interleaved rather than ordered by importance. Several sentences are ungrammatical, and the `more` explanation cannot be parsed on first read; it is under-edited, not concise.

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?

For a four-parameter search tool with an output schema, the description covers the substantial parts: both path modes, relevance ordering, per-document limits, synonym handling, retry behavior, and how to follow up with `read`. The main omission is a clear statement of the `more` field's semantics, which the garbled sentence leaves ambiguous even though an output schema exists.

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 the schema already documents all four parameters including both `path` values. The description adds rationale rather than new syntax: re-querying with `/documents/<id>` to rank only one document's pages, and that `query` words need not match a question's framing words ('how, get or take'). Useful but marginal over a fully documented schema.

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 opening sentence names a specific verb and resource (search the text of every document, or one, for pages that say the words) and states the ranking order, and it distinguishes the two `path` modes. The archaic phrasing ('the pages that say the words', 'a table of contents last') forces the agent to decode, but the operation is identifiable.

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?

It gives an explicit selection rule with examples ('Use it when no title names what you're looking for, as for a price in the Mail Classification Schedule or a rule in a DMM chapter') and a retry rule when nothing matches. It also chains to the `read` sibling. The one gap: `/documents` mode is effectively a title search, which overlaps the `search` sibling, and no guidance distinguishes them.

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