Skip to main content
Glama

AIDataParser

Infer a reusable JSON Schema from a sample

infer_schema

Given one sample document's text, propose a reusable JSON Schema for that document type. Use this when no built-in schema_id fits: infer a schema once, review it, then reuse it as schema on parse_document / parse_text across many documents for consistent output. Returns the JSON Schema plus a flat field list and an inferred doc_type. Costs 1 credit per successful call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesA single representative sample of the document type, as text.
doc_typeNoOptional hint for what kind of document this is, e.g. "purchase order", "lab report".
instructionsNoOptional guidance on which fields matter or how to shape the schema.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses the return payload (JSON Schema plus flat field list and inferred doc_type) and the cost ('1 credit per successful call'). It does not discuss failure behavior or idempotency, but for a non-destructive inference tool the disclosed behavior is solid.

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?

Three sentences, each contributing distinct value: the core behavior, the usage context, and the return/cost details. The most decision-relevant information is front-loaded.

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?

Despite having no output schema, the description explicitly states what the call returns. It also warns about credit cost and connects the result to downstream tools. For a 3-parameter tool with rich schema descriptions, this is complete.

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%, so the input schema already documents all three parameters. The description references `text` but does not add semantic detail beyond the schema; baseline 3 is appropriate.

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 and resource: infer a reusable JSON Schema from one sample document's `text`. It clearly distinguishes the tool from siblings like parse_document/parse_text by positioning it as the schema-inference step that precedes them, and from list_schemas by the 'when no built-in schema_id fits' condition.

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?

'Use this when no built-in schema_id fits' gives an explicit selection condition, and 'reuse it as `schema` on parse_document / parse_text' tells the agent exactly how the result fits the larger workflow. This is strong routing guidance with little left to inference.

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.