Skip to main content
Glama

json_set

Set a value at a jq-like path in local JSON or JSONC, returning updated JSON or writing to a file. Works on strings or file paths without network calls.

Instructions

Set a value at a jq-like path; returns updated JSON (optionally write file). Local files/strings only. Does not fetch URLs or contact external services.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
textNoRaw JSON/JSONC string (alternative to filePath).
valueNo
indentNo
minifyNo
filePathNoLocal JSON/JSONC file path.
outputPathNo
parseValueNoIf value is a string, try JSON.parse.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does well by stating that it returns updated JSON, can optionally write a file, and never contacts external services. However, it is vague about whether the original file is modified and about the exact role of outputPath.

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 sentences with no filler; the main operation, return behavior, output capability, and safety constraint are all included. It is front-loaded and efficient.

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?

The description covers the core operation and a key constraint, but it omits usage guidance against siblings, parameter clarifications for formatting options, and precise file-writing behavior. It is minimally adequate but not complete for a mutation tool with eight parameters and no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 38%, so the description needs to compensate. It adds context for local text/file inputs and output writing, but it does not clarify key parameters such as indent, minify, outputPath behavior, or how value is interpreted beyond the schema's brief parseValue note. This is insufficient for an 8-parameter tool.

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?

Description states a specific verb and resource: set a value at a jq-like path, returning updated JSON. This clearly distinguishes it from sibling tools like json_get, pretty_json, and validate_json.

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?

The description gives useful constraints (local files/strings only, no external fetching), but it does not explicitly say when to use this tool versus alternatives. There is no mention of using json_get for reads or validate_json for validation, so selection guidance is largely absent.

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