Skip to main content
Glama

json_extract

Extract specified fields from text into a JSON object, setting missing fields to null so callers can parse structured data reliably.

Instructions

Extract a caller-specified list of fields from a blob of text into a JSON object. Each requested field becomes a key; the value is null when the field is absent from the text. [conductor: verified stochastic command]

Input Schema

NameRequiredDescriptionDefault
textYes
fieldsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It usefully states that absent fields map to null, but says nothing about determinism despite the odd '[conductor: verified stochastic command]' tag, nothing about how fields are matched (exact keys, dot paths, regex), duplicate field names, or cost/limits of the extraction.

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?

Two tight sentences, front-loaded with the operation, followed immediately by the output contract. The trailing bracketed conductor tag is unexplained noise that slightly undercuts an otherwise clean definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It is a simple two-parameter tool and the description covers the output contract in lieu of an output schema, which is the right instinct. However, the ambiguity around how field names are resolved and the unexplained 'stochastic' note leave an agent without enough to predict results reliably.

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 0%, so the description must compensate. It maps 'text' to the source blob and 'fields' to the requested keys and explains the null-on-absence behavior, which is real added value, but it never says what field syntax is accepted (plain strings vs nested paths) or how values are typed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb plus resource ('Extract ... fields from a blob of text into a JSON object') and even specifies the output shape. It does not differentiate itself from generic siblings such as extract_dates or fix_json, but the operation is concrete enough that an agent can tell what it does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to prefer this over siblings like extract_dates, extract_emails, extract_contact, or fix_json, nor any prerequisites or exclusions. Usage is only inferable from the purpose sentence itself.

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