Skip to main content
Glama

Mango Inventory

Create field definition

create_field_def

Create ONE custom field definition for items, on a category (categoryId) or org-wide (no categoryId: applies to ALL items). Types: text, number, currency (money amount, numeric value; per-field currencyCode, default = the organization's default currency), date, select (with options), multiselect (several options at once, value = array of option strings), boolean, url (http(s) link). required makes items incomplete until filled; unique (text/number) enforces distinct values across the organization, e.g. serial or inventory numbers. scaffold_categories creates several fields at once. Not idempotent: a repeated call creates a second field. Requires the manager role.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "label": "<label>",
      "type": "<type>"
    },
    "name": "create_field_def"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYes
labelYesField label shown in the app
uniqueNoEnforce distinct values (text/number only)
optionsNoAllowed values — required for select and multiselect, forbidden otherwise
requiredNo
categoryIdNoCategory id — omit for an org-wide field
currencyCodeNoISO 4217 code for currency fields only (e.g. EUR) — absent = the organization's default currency (defaultCurrency in get_setup_status), which is written into the new field. All of the field's values are amounts in THIS one currency; values render code-first (EUR 1'234.50).

Output Schema

NameRequiredDescriptionDefault
typeNoField type (immutable once created)
labelNoField label as stored (trimmed)
requiredNoWhether a value is mandatory
fieldDefIdNoThe new field definition's id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, it discloses the concrete consequence of non-idempotency, the manager-role requirement, the org-wide scope when categoryId is omitted, and how required and unique constraints affect items. These details materially improve safe invocation.

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 description is dense but front-loaded and well structured, moving from purpose to type semantics to constraint behavior to sibling guidance. Every sentence carries operational value.

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?

For a 7-parameter create tool with annotations and an output schema, the description covers the critical behavioral, permission, scoping, and non-idempotency details an agent needs. Return-value documentation is correctly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the 71% schema coverage: it explains type-specific behavior, currencyCode defaulting to the organization's default currency, option-array semantics for multiselect, category scoping, and the practical effect of required and unique.

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 states a specific verb and resource: 'Create ONE custom field definition for items,' and immediately clarifies its two scopes, category-specific or org-wide. It also distinguishes the tool from scaffold_categories, which creates several fields at once.

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?

It gives explicit usage conditions: categoryId creates a category field, omitting categoryId creates an org-wide field applying to ALL items, and scaffold_categories is the bulk alternative. It also notes the manager-role requirement and that repeated calls create additional fields.

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