Skip to main content
Glama

json_json_merge

Merge two JSON objects by applying a patch that overrides keys in the base object. Provide base and patch as JSON strings to get the combined result.

Instructions

[json] Merge two JSON objects. Keys in the patch object override the base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes
patchYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description must provide behavioral insight. It states that keys in the patch override the base, indicating a shallow merge approach, but does not clarify if the merge is deep, how arrays are handled, or that inputs must be valid JSON strings. This leaves ambiguity for the agent.

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?

The description is a single, efficient sentence that gets straight to the point. It uses a clear prefix '[json]' and front-loads the action, with zero wasted words.

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?

Given the tool's simplicity (two string parameters, output schema exists), the description provides the essential purpose. However, the lack of parameter descriptions and missing behavioral details (e.g., deep merge depth) leaves gaps that could hinder correct invocation, especially for new users.

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?

The input schema lacks descriptions for both parameters (0% coverage). The description only implicitly refers to the parameters as 'base' and 'patch' without explaining that they should be JSON strings or providing examples. This forces the agent to infer meaning.

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 specific override behavior. It includes a helpful '[json]' prefix and distinguishes this tool from siblings like json_json_filter or json_json_get by focusing on merging.

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 the tool is for merging JSON objects, but does not provide explicit guidance on when to use it versus alternatives like json_json_set or when not to use it. No mention of prerequisites or context.

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/0-co/agent-friend'

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