Skip to main content
Glama

mediawiki_search_in_page

Read-only

Search within a specific wiki page for text or regex matches and return line numbers with surrounding context, not across the whole wiki.

Instructions

Search WITHIN a known page (not across wiki).

USE WHEN: User says "find X on page Y", "does page Y mention X", "search for X in the Configuration page".

NOT FOR: Finding which page contains info (use mediawiki_search instead).

PARAMETERS:

  • title: Page name (required)

  • query: Text to find (required)

  • use_regex: Enable regex matching (optional)

  • context_lines: Lines of context around matches (default 2)

RETURNS: Matches with line numbers and surrounding context.

Input Schema

NameRequiredDescriptionDefault
queryYesText to search for
titleYesPage title to search in
rationaleNoOptional one-sentence explanation of why you are calling this tool. Used for audit trails when present.
use_regexNoTreat query as a Go RE2 regex. Characters like . [ ] * + ? ( ) have special meaning; escape with backslash for literal match. Max 500 chars.
context_linesNoLines of context around matches (default 2)

Output Schema

NameRequiredDescriptionDefault
queryYes
titleYes
matchesYes
match_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.31.0
    • addedInput schema / properties / rationale
      Added value: +{
      +  "description": "Optional one-sentence explanation of why you are calling this tool. Used for audit trails when present.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and idempotentHint=false, so the safety profile is covered structurally. The description adds the return shape (matches with line numbers and context), which is useful, but it does not explain the non-idempotent hint or any permission/rate-limit behavior. Modest added value over annotations.

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?

Front-loaded with the core distinction, then cleanly sectioned USE WHEN / NOT FOR / PARAMETERS / RETURNS. Every line carries information and nothing is padded.

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?

An output schema exists, so return values needn't be explained, yet the description still summarizes them briefly. Scope, alternative routing, and parameter defaults are all present for what is essentially a scoped search tool.

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 description coverage is 100% and the schema descriptions are actually richer (e.g., the RE2 regex escaping rules and 500-char limit for use_regex) than the brief parameter list in the description. The description restates parameters rather than adding meaning, so the baseline 3 applies; it also omits the 'rationale' parameter entirely.

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?

States a specific verb+resource+scope ('Search WITHIN a known page (not across wiki)') and immediately contrasts it with the sibling mediawiki_search. An agent can distinguish it from mediawiki_search, mediawiki_search_in_file, and mediawiki_find_replace without opening any schema.

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?

Provides explicit USE WHEN examples ('find X on page Y') and an explicit NOT FOR clause that names the alternative tool (mediawiki_search) for the cross-wiki case. When-to-use, when-not-to-use, and the alternative are all stated.

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