Skip to main content
Glama

Define a custom contact field

define_contact_field

Declare a custom attribute on this site's contacts so it becomes a labelled, filterable, segmentable field rather than a raw key. Use it when the user wants a specific label or a non-text type (number, date, boolean, or select with fixed options) — a plain text field is created automatically by upsert_contacts for any new key it sees. Defining a field never touches existing contact values, and values already stored under that key light up immediately.

Input Schema

NameRequiredDescriptionDefault
labelYes
optionsNo
site_idYesThe site to define the field on
field_keyYes
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
field_typeNotext

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: the user's goal behind this call, in one short sentence of plain words (e.g. \"add a page so customers can book tables\"). No names, emails or other personal details.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Adds real value beyond the annotations: it discloses that defining a field never mutates existing contact values and that already-stored values under that key become usable immediately — neither fact is derivable from readOnlyHint/destructiveHint/idempotentHint. The gap is re-invocation behavior: idempotentHint=false is not explained (does defining the same key twice error, or create a second field?).

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?

Three sentences, front-loaded with purpose then the routing rule then the side-effect guarantee — nothing is wasted. The middle sentence is long and packs several conditions, which slightly slows scanning but does not cost clarity.

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 6-parameter mutation tool with no output schema, the description covers purpose, the decision boundary with upsert_contacts, and the non-destructive side effect. What's missing is the outcome of a duplicate define and any site/permission prerequisite, which an agent would want before calling.

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?

With only 33% schema coverage, the description does meaningful compensating work: it explains the field_type options (number, date, boolean, select with fixed options), ties options to the select case, and frames field_key as the raw key that existing values are stored under. It leaves label's length limits, field_key's 64-char cap, options' 100-item cap, and the user_goal parameter unaddressed.

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 (declare a custom attribute on contacts) plus the outcome it enables — a labelled, filterable, segmentable field rather than a raw key. That framing distinguishes it from the implicit field creation done by upsert_contacts, so an agent can pick between them without opening either schema.

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

Usage Guidelines5/5

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

Explicitly says when to use it (user wants a specific label, or a non-text type such as number/date/boolean/select with fixed options) and names the alternative path (a plain text field is auto-created by upsert_contacts for any new key). That is a clear when/when-not with a named sibling.

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