Skip to main content
Glama

Search inside page text

grep_pages
Read-only

Find specific text in Wiki.js pages using regex, returning matching lines with context. Use path prefix, tags, or locale to narrow the search.

Instructions

Searches the actual text of pages with a regular expression, by fetching them and matching locally. This exists because Wiki.js’ default search engine does not index page content at all. It is the expensive path — one request per page — so narrow it with path_prefix, tags or locale, and keep max_pages small. Returns matching lines with context, not whole pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
localeNoLocale code. Defaults to WIKIJS_LOCALE. The locale is part of a page’s identity.
patternYesJavaScript regular expression, matched against page content.
max_pagesNoHow many pages to fetch at most (default 60).
ignore_caseNoCase-insensitive matching (default true).
path_prefixNoOnly pages whose path starts with this prefix.
context_linesNoLines of context around each match (default 1).
Behavior5/5

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

Despite readOnlyHint being present, the description adds substantial behavioral context: it fetches pages one-by-one, matches locally, is expensive, and returns matching lines with context rather than whole pages. This goes beyond the annotation and gives the agent a realistic expectations about cost and output.

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?

Four sentences, each earning its place: what it does, why it exists, how to control cost, and what it returns. The most important scoping and cost warnings are front-loaded before the return format.

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

Completeness5/5

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

For a moderately complex, high-cost read operation with no output schema, the description still tells the agent the return shape, the performance profile, the motivation, and the narrowing levers. Nothing essential is missing for correct tool selection and safe invocation.

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 86%, so the baseline is 3, but the description enriches parameter understanding by explicitly recommending path_prefix, tags, or locale to narrow the search and advising to keep max_pages small. These are strategic parameter-usage insights not present in the schema.

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?

The description opens with a specific verb and resource: 'Searches the actual text of pages with a regular expression, by fetching them and matching locally.' It also distinguishes itself from Wiki.js's default search engine and the sibling search_pages by explaining the default does not index page content at all.

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?

The description clearly states when this tool is appropriate — when page content must be searched because the default search engine doesn't index it. It also warns that this is the expensive path and tells the caller to narrow the scope with path_prefix, tags, or locale and to keep max_pages small. It does not explicitly name an alternative tool for the when-not case, but the intent is clear.

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/ni-c/wikijs-mcp'

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