Skip to main content
Glama

Set Mapping

set_mapping
DestructiveIdempotent

Create or update a mapping at the given scope. Uniqueness is on (scope, kind, source) — re-setting an existing source overwrites the target. Returns null if the target is not a valid canonical for the kind.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesEither IDENTITY_FIELD or EVENT_TYPE.
scopeYesEither CUSTOMER or GLOBAL.
sourceYesCustomer-supplied source name, e.g. 'nombre' or 'user_registered'.
targetYesCanonical value the source maps to, e.g. 'FULL_NAME' (for IDENTITY_FIELD) or 'REGISTRATION' (for EVENT_TYPE).
descriptionNoOptional human-readable description for trainers/LLM context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive and idempotent behavior, and the description adds the critical specifics: uniqueness tuple (scope, kind, source), overwrite semantics on re-set, and null return for invalid canonical targets. This is exactly the behavioral context an agent needs beyond the structured hints.

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 compact sentences front-load the action and then pack the essential uniqueness, overwrite, and return-validity behavior. No filler or repetition of schema fields.

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 moderately complex upsert tool with idempotence/destructive annotations and a 100%-covered schema, the description covers scope, uniqueness, overwrite, and invalid-target return. It does not state the success return value, but that is a minor omission for a side-effecting mapping setter.

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 already documents every parameter at 100% coverage, so baseline is 3; the description adds relational meaning not in the schema by defining the uniqueness key across scope, kind, and source and the overwrite effect on target. That lifts it slightly above baseline.

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?

Begins with a clear action ('Create or update') and resource ('a mapping at the given scope'), and the uniqueness/overwrite detail separates it from sibling list_mappings and delete_mapping. The description tells an agent exactly what the tool accomplishes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The verb phrase 'create or update a mapping' clearly marks this as the write/upsert tool for mappings, contrasting implicitly with list_mappings (read) and delete_mapping (removal). It does not explicitly name alternatives, but the context makes the selection obvious.

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.