Skip to main content
Glama

Search a page for text

find_in_page
Read-onlyIdempotent

Locates exact phrases or regular expressions in web pages or PDFs, returning each match with surrounding context and its section ID for quick reference.

Instructions

Finds exact text (case-insensitive) or a regular expression in a page or PDF and returns each match with surrounding context and its section id. For facts whose wording you know: a name, a number, an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYeshttp(s) URL
textYes
regexNo
contextNochars around each match, default 200

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
totalYes
matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry readOnlyHint, openWorldHint, idempotentHint, and destructiveHint. Beyond those, the description adds useful behavioral detail: case-insensitive matching, regex support, per-match surrounding context, and section-id association—none of which the annotations convey. No contradiction with annotations; the description complements them well.

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 with no filler. The first sentence front-loads the mechanism and result shape; the second gives a crisp usage pointer. Every phrase earns its place.

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?

With an output schema present and strong annotations, much of the return contract is already structured. The description covers the core behaviors an agent needs: target scope (page/PDF), matching modes, and result content. Minor gaps remain—match limits, behavior on zero matches, and what 'section id' means—but they're not critical for a read-only, idempotent tool.

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 only 50% (url and context are described; text and regex are not). The description compensates by clarifying that 'text' is exact text or a regular expression, and by implying the regex boolean toggles that mode. This adds meaning beyond the bare schema for the two undocumented parameters, though it doesn't specify regex flags or the default behavior of the regex flag.

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 names a specific verb ('Finds'), resource ('a page or PDF'), and two distinct modes (exact case-insensitive text or regular expression) plus the output shape (matches with surrounding context and section id). This clearly differentiates it from siblings like read_page, page_links, and page_outline, which are structurally different operations.

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?

Provides a concrete when-to-use signal: 'For facts whose wording you know: a name, a number, an error message.' This helps the agent choose search over reading a whole page. However, it stops short of explicitly naming alternatives or stating when not to use this tool (e.g., when the tool should defer to read_page), so it doesn't earn a 5.

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

Deploy Server

Other Tools