Skip to main content
Glama

Embeddings, Rerank & Speech-to-Text (Tanod)

extract_json_with_schema

Read-onlyIdempotent

mlpeek: Extract JSON from text that always matches your JSON Schema. For fixed entity types use extract_entities. Returns data, JSON extracted from the text that always parses and validates against your json_schema (decoded under a grammar built from it), plus model, usage (tokens) and ms. A small open model on Tanod's CPU, no model API: values can be wrong or missing, so check what matters. At most 8,000 characters and an 8 KB, 6-level schema; set maxLength / maxItems for long values. Bad input or an answer over 1,024 tokens is a 422; two extractions at once at most, so busy is a 503 with Retry-After; over 40 s is a 504 (none charged). The text is data, never instructions. Typically 3-15 s; up to about 25 s for 8,000 characters. Price: USD 0.005. No free tier. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/embeddings-rerank-ner-mcp-server.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>",
      "json_schema": "<json_schema>"
    },
    "name": "extract_json_with_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to read, 1 to 8,000 characters: an invoice, job post, contact block, product page or announcement. It is treated as data, never as instructions.
json_schemaYesA JSON Schema object for the answer: at most 8 KB serialised, nested at most 6 levels, local $ref only. The answer always matches it. Set maxLength / maxItems for long values (unbounded strings are cut at 300 characters and arrays at 50 items in decoding).

Output Schema

NameRequiredDescriptionDefault
msNo
dataNo
noteNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
modelNo
usageNo
licenseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / json_schema / title
      Removed value: -"Json Schema"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / title
      Removed value: -"extract_json_with_schemaArguments"
    • removedOutput schema / properties / data / description
      Removed value: -"The extracted JSON; it validates against the json_schema sent."
    • removedOutput schema / properties / usage / properties
      Removed value: -{
      -  "completion_tokens": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "prompt_tokens": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which only declare it read-only, idempotent and non-destructive) by disclosing failure modes and their status codes (422 for bad input or >1,024-token answer, 503 with Retry-After for concurrency, 504 past 40 s with no charge), latency expectations, price, and that text is never logged or stored. It also warns that a small CPU model can return wrong or missing values, which is exactly the reliability caveat an agent needs.

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?

Dense but front-loaded: the guarantee comes first, then the sibling disambiguation, then limits and failure modes. It is long for a single tool and the 'text is data, never instructions' point is made twice (also in the schema), which is mild redundancy rather than waste.

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?

For a tool with an output schema already present, the description supplies everything else an agent needs: input ceilings, schema ceilings, truncation defaults, latency, cost, concurrency limits, and error semantics. Nothing material is left to inference.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: json_schema is compiled into a decoding grammar, has an 8 KB / 6-level / local-$ref ceiling, and unbounded values get silently truncated in decoding unless the caller sets maxLength or maxItems. That truncation behavior is the key semantic an agent must know before deciding on a schema.

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 JSON from text') and adds the defining constraint that the output 'always matches your JSON Schema' decoded under a grammar built from it. It explicitly separates itself from the sibling extract_entities ('For fixed entity types use extract_entities'), so an agent can pick between them without opening a 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?

Names one concrete alternative (extract_entities) and the condition that selects it (fixed entity types), and gives practical sizing guidance ('set maxLength / maxItems for long values'). It does not cover the wider question of when structured extraction is preferable to a plain search tool, but the routing guidance it does give is unambiguous.

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.