Skip to main content
Glama

detect_doc_type

Identify document type by running structural heuristics before chunking. Returns a resolved doc_type token to preview which parser or chunking strategy applies.

Instructions

Run structural heuristics to detect document type.

Useful when you want to know what chunk_text would pick before actually chunking. Returns the resolved doc_type token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool runs heuristics and returns a resolved doc_type token, which is adequate for a detection tool. However, it doesn't add context about edge cases (e.g., undetectable type, empty text) or the meaning of 'resolved' — a read-only detection tool could still clarify fallback behavior, so a 3 is appropriate.

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?

The description is compact and front-loaded with the primary purpose, followed by the usage context and return value. Each sentence contributes information with no wasted words. The structure could be improved by explicitly tying the parameter to the heuristic input, but overall it is efficient.

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, the description doesn't need to detail return values, and it explains the purpose, use case, and behavior adequately for a single-parameter tool. Minor gaps remain around edge-case behavior and the exact meaning of 'resolved,' but the tool is simple enough that the description is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the undocumented `text` parameter. The description only implies that 'text' is the document being analyzed — it never explicitly states what the parameter represents or its expected format. With the schema providing zero guidance, this is a real gap that a sentence like 'text: the document content to analyze' would fill.

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 states a specific verb-resource pair ('detect document type') and explains the mechanism ('structural heuristics'). It also explicitly positions itself relative to the sibling tool chunk_text as a pre-chunking check, making it distinguishable from the other siblings without opening schemas.

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?

The description gives a clear use case: 'Useful when you want to know what chunk_text would pick before actually chunking.' This names the relevant sibling and the condition that selects this tool. However, it doesn't explicitly state when NOT to use it or mention other alternative tools, so it falls just short of a 5.

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