Skip to main content
Glama

json_merge

Deep-merge two JSON objects into one, with the second overriding the first on shared keys. Pure CPU, instant.

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": {
      "a": "<a>"
    },
    "name": "json_merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesFirst JSON object
bNoSecond JSON object

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / a
      Added value: +{
      +  "description": "First JSON object",
      +  "type": "string"
      +}
    • addedInput schema / properties / b
      Added value: +{
      +  "description": "Second JSON object",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "a"
      +]
  4. Added

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it usefully discloses merge depth ('deep') and override precedence and signals the call is cheap and side-effect-free ('Pure CPU, instant'), but it does not state whether arrays are merged or replaced, how invalid JSON is reported, or whether inputs are mutated.

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 short sentences, front-loaded with the operation and precedence rule, then a cost note. Nothing is redundant or padded.

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?

For a two-parameter utility with a fully described schema and no output schema, the essential behavior is covered, but the two things an agent would still guess at, array handling and invalid-JSON failure mode, remain unstated.

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 a baseline of 3 applies, but the description goes beyond the bare 'First JSON object' / 'Second JSON object' labels by defining the relationship between them: b wins on shared keys, a supplies the base. That relational meaning is not 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 gives a specific verb and resource (deep-merge two JSON objects) plus the exact precedence rule ('second overriding the first on shared keys'), which no sibling tool (json_flatten, json_path, json_validate) provides, so an agent can distinguish it easily.

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?

Usage is implied by the stated merge direction, but the description never says when to choose this over json_flatten, json_path, or json_validate, and offers no exclusions or preconditions (both inputs must be valid JSON strings).

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.

Resources