Skip to main content
Glama

UK Data: Code utilities

merge_dictionaries

Read-onlyIdempotent

Merges two dictionaries into a single dictionary, with values from the second dictionary overwriting those from the first for duplicate keys. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
dict1Noobject, required, the first dictionary
dict2Noobject, required, the second dictionary to merge into the first

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world behavior. The description adds important behavioral detail beyond those annotations: dict2 values overwrite dict1 values for duplicate keys, and the call costs 1 credit.

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 definition is one tightly written sentence plus a brief cost note. It is front-loaded with the operation and key semantics, with no unnecessary wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter dictionary utility with full schema coverage and annotations covering safety, the description is nearly complete. It explains the merge outcome and duplicate-key behavior, though it does not describe input formatting or explicitly state the return shape.

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 100%, so the baseline is 3. The description improves on the schema by specifying merge precedence: values from the second dictionary overwrite those from the first for duplicate keys, which is not captured in the parameter descriptions.

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 uses a specific verb and resource ('Merges two dictionaries') and defines the resulting merge behavior for duplicate keys. It distinguishes itself from list-merge siblings such as merge_sorted_lists by explicitly naming dictionaries and value precedence.

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 operation and overwrite semantics are clear, so the use case is implied. However, the description does not explicitly state when to choose this tool over alternatives or mention any exclusions or prerequisites.

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