Skip to main content
Glama

Ask Question About Document

document_query
Read-onlyIdempotent

Ask a natural-language question about a document image; returns a grounded answer plus the supporting line.

Returns found:false rather than guessing when the document doesn't contain the answer.

Returns: dict with keys: answer (str|null), found (bool), supporting_text (str|null), text (str).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesBase64-encoded PNG/JPEG of the document page
questionYesThe natural-language question about the document

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only/idempotent behavior. The description adds meaningful behavioral context beyond those hints: it explains that the tool returns found:false rather than guessing, and documents the exact return keys and nullability. This helps the agent understand failure behavior.

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: purpose first, then key behavioral guarantee, then return shape. Every sentence contributes information, and the return list is necessary because there is no output schema.

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?

For a two-parameter, read-only tool, the description covers inputs, behavior, and return structure well. The main gap is the undocumented 'text' field in the return dict, and there is no mention of failure modes beyond the found:false case.

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%, so both parameters are already documented in the schema. The description mirrors that information without adding extra constraints, formats, or usage details beyond what the schema provides.

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 uses a specific verb and resource: 'Ask a natural-language question about a document image.' It clearly states the output ('a grounded answer plus the supporting line') and includes the no-guessing fallback, which makes it distinct from sibling extraction/markdown/image tools.

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 use case is implied by the tool name and description, but there is no explicit guidance about when to use this tool instead of siblings like document_extract or understand_content, nor any exclusion criteria. The description tells what it does, not when to prefer it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation4/5

Most tools are clearly distinct: document_* handle document analysis, while image tools (remove_background, restore_face, upscale_image) are unambiguous. However, document_extract and understand_content both perform field extraction from documents, differing mainly in schema flexibility, which could cause misselection. run_skillsets also overlaps conceptually as a pipeline tool.

Naming Consistency3/5

Naming is partially consistent: image tools follow a verb_noun pattern (remove_background, restore_face, upscale_image), and document tools share a 'document_' prefix. However, the document tools mix noun_verb (document_extract, document_query) with noun_noun (document_tables) and document_to_markdown deviates with a preposition. This mixed convention reduces predictability.

Tool Count5/5

With 10 tools, the count is well within the ideal 3-15 range. Each tool addresses a meaningful capability, from document parsing to image enhancement, without feeling redundant or excessive. The scope is appropriate for a multi-purpose image/document API.

Completeness4/5

The surface covers core workflows: document structuring (extract, markdown, tables, query), image enhancement (upscale, background removal, face restore), and health checks. Minor gaps include lack of explicit image format conversion or document deletion, but these are not essential for the stated purpose. Overall, the tools form a coherent set with no obvious dead ends.

Resources