Skip to main content
Glama
ShamanAndrey

kicad-mcp-layer

by ShamanAndrey

doc_text

Read-onlyIdempotent

Extract text from PDFs or documents by page, or search with regular expressions to return page numbers and short context windows for quick document lookups.

Instructions

Extract the text of a PDF (or read a text document), per page, or search it. With find, the answer is the matches alone: a page number and a short window per hit, so a lookup costs a few hundred tokens; add pages to read a page around a hit. Pages that are drawings or scanned images come back empty; use doc_page to look at those.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesDocument id, library file name, title, or a path inside the workspace.
findNoRegular expression to locate in the text; matches come back with page numbers and one context window each (overlapping windows merged), and no page text unless pages is given.
pagesNoPages to return, e.g. '3-5,12'. Without find: default all, capped to keep the answer readable. With find: default none, only the matches come back.
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYes
textYesExtracted text per page; empty for image-only pages, which doc_page can render.
pagesYes
matchesNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description adds non-obvious behavior: token cost of a find ('a few hundred tokens'), that scans/drawings return empty, and that find suppresses page text unless pages is given. It stops short of describing truncation behavior for max_chars or the exact response shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose, then elaborates cost, modes, and the empty-page caveat in tightly packed sentences. No sentence is wasted, though the find-cost clause is dense and could be split.

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?

An output schema exists, so return-shape explanation is unnecessary; the description supplies the mode logic, cost, and failure case needed to call it correctly. Only minor gaps remain around max_chars and behavior when the document is missing or unreadable.

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?

With 75% schema coverage the schema documents doc/find/pages but not max_chars, and the description compensates by explaining the find-vs-pages interaction and defaults ('with find: default none', 'add pages to read a page around a hit'). max_chars remains only vaguely covered by 'capped to keep the answer readable'.

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 and resource ('extract the text of a PDF / read a text document'), names the modes (per page or search), and explicitly routes image/scanned pages to the sibling doc_page. An agent can identify the tool and its boundary with doc_page without opening the schema.

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?

Gives clear when-to guidance: use find for a cheap lookup, add pages to read around a hit, and use doc_page for pages that are drawings/scanned images. It does not address when to choose this over the other doc_* siblings (doc_facts, doc_sections, doc_fetch), so the alternative coverage is only partial.

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