Skip to main content
Glama

Define field

define_field

Add a custom field to any object that supports them (core objects with custom fields, or any custom object). field_type is one of text/number/date/select/multiselect/boolean/url, or 'relationship' (then pass target_object — stores the target record's id). select/multiselect need options. Returns the created field definition.

When to use: When an admin wants a new attribute on a core or custom object — text, number, date, choice, boolean, url, or a relationship.

Example: Add a 'square footage' number field to the Property object.

Input Schema

NameRequiredDescriptionDefault
labelYesDisplay label. Its slug (lowercase, underscores) becomes the field key, which must be unique on the object.
optionsNoThe allowed choices for a select or multiselect field, as labels; at least one is required. Ignored for other types.
field_typeYesThe field's storage type: text, number, date, select or multiselect (pass options), boolean, url, or relationship (a link to another object; pass target_object).
object_typeYesObject key to add the field to — a built-in object that supports custom fields, or any custom object (see describe_schema).
target_objectNoFor field_type relationship: the object key (built-in or custom) whose record id this field stores.

Output Schema

NameRequiredDescriptionDefault
fieldNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  2. Changed4 schema fields changed
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -{}
    • removedOutput schema / properties / field / additionalProperties
      Removed value: -{}
    • removedOutput schema / properties / field / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the safety profile is covered. The description adds real behavioral value beyond that: conditional parameter requirements (relationship needs target_object, select/multiselect need options) and the fact that it returns the created field definition.

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?

Front-loaded with the core action, then 'When to use', then a concrete example. Every section earns its place, though the block structure is slightly longer than strictly needed for a well-covered schema.

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

Completeness5/5

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

With a 5-parameter tool, an output schema present, and annotations covering safety, the description supplies the missing conditional logic and an example without needing to explain return values. An agent has everything required to invoke it correctly.

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 already 100%, so the baseline is 3. The description goes beyond the schema by surfacing the cross-parameter conditionals in one place (field_type='relationship' → pass target_object) and enumerating the allowed type values, which helps an agent pick valid combinations.

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?

Specific verb+resource ('Add a custom field') with scope qualifier ('any object that supports them — core objects with custom fields, or any custom object'). This cleanly distinguishes it from siblings like update_field, archive_field, and define_object.

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?

A dedicated 'When to use' line frames the trigger as 'an admin wants a new attribute on a core or custom object', which is clear operational context. It does not, however, explicitly contrast with update_field or say when not to add a field, so it stops short of 5.

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