Skip to main content
Glama

merge_json

Merge two JSON objects using a deep or shallow strategy. Combine nested structures with deep merge or override top-level keys with shallow merge.

Instructions

Merge two JSON objects with deep or shallow strategy.

Parameters:
    json_a — First JSON string.
    json_b — Second JSON string.
    strategy — 'deep' (default) or 'shallow'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
json_aYes
json_bYes
strategyNodeep

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions merging with two strategies but does not disclose critical behaviors like conflict resolution (overwrite vs combine), error handling for invalid JSON, or the structure of the output. With no annotation support, the description is insufficiently transparent.

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?

The description is concise with two sentences plus a list for parameters. The purpose is front-loaded, and the parameter list is clear. However, the parameter list could be integrated into a more flowing narrative without losing clarity. Overall, it is efficient and easy to parse.

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 tool has 3 parameters and an output schema (not shown). The description covers the parameters adequately but omits any description of the return value. For a simple tool, this might be acceptable, but the lack of information about the output format or potential errors leaves the agent uncertain about what to expect. It is minimally complete for the given complexity.

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 description coverage is 0%, so the description must compensate. It provides meaningful definitions for all three parameters: json_a and json_b are described as 'First JSON string' and 'Second JSON string', and strategy is explained as 'deep (default) or shallow'. This adds value beyond the bare schema, though it could include format expectations (e.g., valid JSON must be keys in double quotes).

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 merges two JSON objects with a choice of deep or shallow strategy. The verb 'merge' and resource 'JSON objects' are specific, and the distinction between deep and shallow differentiates it from similar siblings like 'flatten_json' or 'unflatten_json'.

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 does not explicitly provide guidance on when to use this tool versus alternatives or when to choose deep vs shallow strategy. The purpose is implied through the parameter descriptions, but there is no contextual 'when-to-use' or 'when-not-to-use' information.

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/scotia1973-bot/api-hub'

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