Skip to main content
Glama
trhonpavel
by trhonpavel

Create or update customer

save_customer
Idempotent

Create a new customer when no ID is given, or update existing customer fields; optionally add an address and manage group memberships.

Instructions

Without customer_id creates a customer (email required); with customer_id updates only the given fields. Can also add an address and add/remove the customer from groups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNo
phoneNo
metadataNoMerged into existing metadata; an empty string deletes a key
last_nameNo
first_nameNo
add_addressNo
customer_idNo
company_nameNo
add_to_groupsNoCustomer group IDs to join
remove_from_groupsNoCustomer group IDs to leave

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare non-read-only, non-destructive, idempotent, open-world, and the description is consistent with them while adding real value: partial-update semantics (only given fields change) and the create-vs-update switch. It does not disclose error behavior or what happens if customer_id doesn't exist, which for a mutation tool would be the remaining gap.

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?

Two dense sentences, front-loaded with the create/update distinction, with no filler. The second sentence packs three capabilities together, which is slightly run-on but still efficient.

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 10-parameter, nested-object mutation with no output schema and low schema coverage, the description covers the essential decision logic and side effects. It omits failure modes and return behavior, but nothing that would cause a wrong invocation.

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 only 30% across 10 parameters, so the description must compensate, and it does: it clarifies the customer_id gating logic, that email is required for creation, and the roles of add_address, add_to_groups and remove_from_groups. It still leaves some params (phone, company_name, metadata merge behavior) unexplained in prose.

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?

States a specific verb and resource and, crucially, splits the tool's two modes by the presence or absence of customer_id. An agent immediately knows this is an upsert-style save, not a read or delete, and can distinguish it from list_customers/get_customer siblings.

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?

Gives clear conditional usage: omit customer_id to create (email required), include it to partially update. It does not name alternatives or explicitly say when not to use it (e.g. to fetch a customer), so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.