Skip to main content
Glama
MukundaKatta

streamparse-mcp

by MukundaKatta

parse_partial_json

Parse partial JSON strings from truncated tool calls. Returns complete JSON by safely closing open structures and reports parsing status.

Instructions

Parse a JSON string that may be truncated mid-stream (e.g. a partial LLM tool call). Always returns a valid JSON value with synthetic closure of any open strings, arrays, or objects. Reports whether the input represented a complete top-level value, plus the cursor path where parsing stopped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe JSON text to parse. May be truncated.
lenientNoWhen true (default), tolerates trailing commas, single quotes, unquoted keys, ```json fences, comments, and prose padding.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses synthetic closure, lenient mode tolerances, and return info (completeness flag and cursor path). However, it does not specify error behavior if input is completely malformed beyond lenient capabilities (though it claims 'always returns a valid JSON').

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?

Two succinct sentences: first states core purpose and key behavior, second adds return value details. No wasted words.

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?

Given 2 parameters, no output schema, and low complexity (no nested objects), the description sufficiently covers behavior, input constraints (truncation, lenient flags), and return information (synthetic closure, completeness, cursor path).

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 baseline is 3. The description adds no new parameter meaning beyond the schema; it merely repeats that text 'may be truncated' and describes lenient tolerances, which are already in the 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?

The description clearly states the tool parses a potentially truncated JSON string and always returns a valid JSON with synthetic closure. It distinguishes from sibling tools like extract_json_from_text and validate_json by focusing on partial input handling.

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

Usage Guidelines3/5

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

The description implies usage when JSON may be truncated but does not explicitly state when to use this tool over siblings (extract_json_from_text, validate_json) or provide conditions for using the lenient parameter.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MukundaKatta/streamparse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server