Search the documents
grepSearch 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Where 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. | |
| limit | No | At most this many; 10 when absent. | |
| query | Yes | Words 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. | |
| topic | No | With /documents: only documents a model put under this topic. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| titles | No |