Skip to main content
Glama

Search for text in Docling document anchors

search_for_text_in_document_anchors
Read-only

Locate exact text inside document anchors using case-insensitive search; if absent, get keyword matches with occurrence counts.

Instructions

Search for specific text and keywords within a document's anchors.

This tool takes a string of text to search for and returns a string of all document anchors that contain the exact text. The search is case-insensitive. If the exact text is not found, the tool will search for individual keywords within the text, splitting it on non-alphanumeric characters. If keywords are found, they are listed alongside their number of occurrences in parentheses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe string of text to search for in the document's anchors.
document_keyYesThe unique identifier of the document in the local cache.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint/destructiveHint annotations by explaining the exact search behavior: case-insensitive matching, fallback to splitting the input into keywords on non-alphanumeric characters, and reporting keyword occurrence counts. This gives an agent a clear model of what will happen.

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?

The description is concise and well-structured, opening with the core purpose and then elaborating with necessary behavioral details. Each sentence adds useful information, with no redundant or filler content.

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?

Given the presence of an output schema, the description does not need to detail return values. It covers the main functionality, search behavior, and fallback logic. A possible gap is the absence of a stated behavior when neither the exact text nor any keywords are found, but this is a minor omission.

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%, with both parameters described in the input schema. The description adds context about the search behavior but does not add new semantic detail about the parameters themselves, so a baseline of 3 is appropriate.

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 description clearly identifies the operation as searching for text within a document's anchors, using a specific verb and resource. It distinguishes the tool from siblings that retrieve or modify anchors, though it does not explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: to find document anchors containing a specific text or keywords. However, it provides no explicit guidance on when to prefer this over related tools like get_overview_of_document_anchors or get_text_of_document_item_at_anchor.

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

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/docling-project/docling-mcp'

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