Skip to main content
Glama

Parse raw text into structured JSON

parse_text

Extract clean, schema-guaranteed JSON from raw/messy text you already have — scraped web content, email bodies, chat logs, OCR output, or pasted tables. Pass the text in text. Use this instead of parse_document when you don't have a file. Optional JSON schema (or schema_id) constrains the output shape and instructions guides extraction. Returns the extracted data plus a confidence score and a review_needed flag. Costs 1 credit per successful call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe raw text to extract structured data from.
redactNoWhen true, PII (emails, SSNs, card numbers, phones, etc.) is masked in the output before it leaves the server.
schemaNoOptional JSON Schema describing the exact output shape you want. When provided, the returned `data` conforms to it.
schema_idNoOptional named template to use instead of a hand-written schema, e.g. "invoice", "receipt", "resume". Call the list_schemas tool for the full set. Ignored when `schema` is provided.
instructionsNoOptional natural-language guidance for what to extract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations are all false and offer no behavioral signal, so the description carries the burden. It adds valuable context: output is schema-guaranteed, returns a confidence score and review_needed flag, and costs 1 credit per successful call. It does not mention error behavior or side effects, but the core operational behavior is disclosed.

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?

Every sentence earns its place: use-case, parameter pointer, sibling routing, optional parameters, return shape, and cost. It is front-loaded with the core purpose and remains readable despite covering multiple facets.

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 five parameters, nested schemas, and no output schema, the description does well by explaining the return envelope (data plus confidence and review_needed) and the credit cost. It could slightly improve by outlining failure/validation behavior, but the essential information for invoking the tool correctly is present.

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 the baseline is 3. The description lightly reinforces the roles of text, schema, schema_id, and instructions, but adds little beyond the schema itself. 'Ignored when schema is provided' is already stated in the schema, so no extra semantic weight is gained.

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 precise verb+resource ('Extract clean, schema-guaranteed JSON from raw/messy text') and lists concrete input types (scraped content, email bodies, chat logs, OCR, tables). It also explicitly distinguishes itself from parse_document, so an agent can pick it correctly without inspecting siblings.

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?

Directly says 'Use this instead of parse_document when you don't have a file', giving an explicit when-to-use rule and naming the alternative. The list of supported text sources further clarifies appropriate contexts.

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.