Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as AALY. If you published it, claim ownership there.

create_field

Add a new field to an entity schema. CHOOSING A TYPE — to LINK records (entity-to-entity relationship), use type 'reference' with targets; for an ARRAY of linked records (e.g. participants, tags) use 'reference' with multiple: true — do NOT store related record IDs as 'text' or as a 'list'. Use 'list' only for arrays of primitives (strings/numbers/booleans), with valueType. For enum fields provide values. Decide type, cardinality (multiple), and targets carefully: they're permanent once set (see update_field's description for what's changeable later and what isn't). Also works against the built-in users entity — its base fields (name/email/password/...) are fixed, but you can add your own business fields (e.g. 'role', 'gender', 'department') exactly like on any other entity; get its entity id from list_entities or describe_project. COMPUTED/STORED — for a field whose value is set by server-side logic rather than the client (computed=true, excluded from the create/update request schema) and/or never persisted (stored=false, e.g. a value presigned/derived fresh on every read): both default to the ordinary case (computed=false, stored=true) and are permanent once set. stored=false cannot be combined with search or unique. A stored=false field only gets a real value if something (today: a platform hook) populates it — declaring one on your own entity is schema support for a capability that isn't available to customer-defined logic yet.

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": {
      "entity_id": "<entity_id>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "create_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoFor text: max char length. For number: max value. For list/multiple: max items.
minNoFor text: min char length. For number: min value. For list/multiple: min items.
nameYesField name in camelCase used in API payloads. Example: 'orderNumber', 'dueDate'
typeYesData type. text=string, number=float/int, boolean, date=YYYY-MM-DD, datetime=ISO8601, enum=fixed values (set `values`), reference=link to another record by ID (set `targets`; use multiple=true for an array of links), list=array of primitives (set `valueType`), object=free-form JSON. For relationships/arrays-of-IDs always use reference, never text or list.
labelNoHuman-readable display name
hiddenNoExcludes the field from GET responses (write-only), e.g. for password-like fields (default false)
searchNoEnables collection-GET filtering on this field via query operators (eq/ne/in/nin for enum/boolean/list/reference; eq/gt/gte/lt/lte for number/date/datetime; eq/starts word search plus exact for a whole value, for text). Results come from an async search index (small post-write lag) — see describe_project's `filtering` section or generate_openapi_spec for the exact operators/syntax this field supports once created. reference fields are always filterable regardless of this flag (except the system audit references _createdBy/_updatedBy/_deletedBy, which are never indexed) — enum and every other type require search:true. On an eligible type (enum/boolean/list/reference/date/datetime — not text/number), search:true ALSO automatically maintains a distinct-value counter for this field (no separate flag needed) — counts are returned under a `facets` key — {field: {value: count}} — only when the caller passes `?facets=true` (or `?facets=<thisFieldName>` to select just this field) on an UNFILTERED GET /{entity} (no query param other than limit/offset/facets); combining `facets=` with any real filter returns a clean 400 (FACETS_REQUIRES_NO_FILTERS), since the counts are a GLOBAL per-entity distribution that wouldn't describe a filtered result set. (default false)
storedNoIf false, the value is never persisted — populated fresh at read time instead (default true, i.e. persisted normally). Cannot combine with search or unique. Permanent once set.
uniqueNoValue must be unique within the tenant, compared case-insensitively ('ABC-1' and 'abc-1' are the same value); a duplicate is a 409 DUPLICATE_VALUE, reported only after the value passes type/pattern/min/max validation (default false)
valuesNoFor enum fields: list of allowed string values
formulaNoRequires computed=true. Derives this field's value server-side from a sandboxed expression over OTHER fields on the same record — no hook/Function needed. Shape: {"type": "expression", "source": "<expression string>"}. `source` names other fields on this entity as bare identifiers (a reference field resolves to its id); supports arithmetic (+ - * / % **), comparisons, boolean/ternary logic, string literals, and a small whitelisted function set: concat(*args) (joins args, no implicit separator — write separators as literals, e.g. concat(category, '-', size)), upper(s), lower(s), trim(s), round(x, ndigits=0), abs(x), min(*args), max(*args). Examples: a `sku` field with formula {"type": "expression", "source": "concat(category, '-', size)"} becomes category+"-"+size on every create; a `total` field with {"type": "expression", "source": "round(quantity * unitPrice, 2)"} computes a real number, not a string. All-or-nothing: if any referenced field is missing on a given write, this field is simply left unset — most useful combined with unique=true and required source fields (e.g. an order number unique per customer built from two other fields). The expression cannot reference its own field's name. Permanent once set.
patternNoFor text fields: regex the value must match. Violations return 400 PATTERN_MISMATCH.
targetsNoFor reference fields: which entities this links to and which of their fields to inline on read. Example: [{"entity": "products", "projection": ["name", "price"]}]. A bare entity name ("products") is accepted too and means {"entity": "products"} with no projection. On WRITE, supply the reference value as {"id": "<recordId>"} (or an array of those when multiple=true); on READ, the projected fields are returned inline.
computedNoIf true, the field's value is set by server-side logic, not the client — excluded from the create/update request schema (default false). Permanent once set.
locationNoREQUIRED when entity_id is a custom endpoint's id (EPT...), not applicable otherwise: whether this field validates that route's request body or a query parameter. stored/unique/search are forced/rejected server-side for an endpoint-owned field — nothing is ever persisted at the endpoint layer.
multipleNoFor enum/reference: allow an array of values instead of a single value (default false). Use this for reference fields to model a one-to-many / array-of-IDs relationship.
requiredNoMust be present on POST (default false)
entity_idYesEntity record ID (e.g. 'ENT3') — or a custom endpoint's id (e.g. 'EPT3', from create_endpoint) to validate that route's request body or query parameters instead. In the endpoint case, also set `location` ('body' or 'query').
precisionNoFor number fields: the maximum number of decimal places. 2 for money; 0 for whole numbers only. A write with more decimals is a 400 NUMBER_PRECISION_EXCEEDED, and values are rounded to this many places on read. Omit to allow any decimals. Permanent once set.
valueTypeNoREQUIRED for type 'list': the element type. string/number/boolean = array of primitives. Do NOT use 'object' to model relationships — for an array of linked records use type 'reference' with multiple:true instead.
descriptionNo
default_valueNoDefault value assigned on POST if field is omitted. Match the field's own type — a JSON boolean (true/false) for type 'boolean', a JSON number for type 'number', a string otherwise. Do NOT quote booleans/numbers as strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / precision
      Added value: +{
      +  "description": "For number fields: the maximum number of decimal places. 2 for money; 0 for whole numbers only. A write with more decimals is a 400 NUMBER_PRECISION_EXCEEDED, and values are rounded to this many places on read. Omit to allow any decimals. Permanent once set.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / targets / description
      Previous value: -"For reference fields: which entities this links to and which of their fields to inline on read. Example: [{\"entity\": \"products\", \"projection\": [\"name\", \"price\"]}]. On WRITE, supply the reference value as {\"id\": \"<recordId>\"} (or an array of those when multiple=true); on READ, the projected fields are returned inline."New value: +"For reference fields: which entities this links to and which of their fields to inline on read. Example: [{\"entity\": \"products\", \"projection\": [\"name\", \"price\"]}]. A bare entity name (\"products\") is accepted too and means {\"entity\": \"products\"} with no projection. On WRITE, supply the reference value as {\"id\": \"<recordId>\"} (or an array of those when multiple=true); on READ, the projected fields are returned inline."
    • addedInput schema / properties / targets / items / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "entity": {
      +        "type": "string"
      +      },
      +      "projection": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / targets / items / properties
      Removed value: -{
      -  "entity": {
      -    "type": "string"
      -  },
      -  "projection": {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  }
      -}
    • removedInput schema / properties / targets / items / type
      Removed value: -"object"
  2. Changed1 schema field changed
    • changedInput schema / properties / search / description
      Previous value: -"Enables collection-GET filtering on this field via query operators (eq/ne/in/nin for enum/boolean/list/reference; eq/gt/gte/lt/lte for number/date/datetime; eq/starts for text). Results come from an async search index (small post-write lag) — see describe_project's `filtering` section or generate_openapi_spec for the exact operators/syntax this field supports once created. reference fields are always filterable regardless of this flag (except the system audit references _createdBy/_updatedBy/_deletedBy, which are never indexed) — enum and every other type require search:true. On an eligible type (enum/boolean/list/reference/date/datetime — not text/number), search:true ALSO automatically maintains a distinct-value counter for this field (no separate flag needed) — counts are returned under a `facets` key — {field: {value: count}} — only when the caller passes `?facets=true` (or `?facets=<thisFieldName>` to select just this field) on an UNFILTERED GET /{entity} (no query param other than limit/offset/facets); combining `facets=` with any real filter returns a clean 400 (FACETS_REQUIRES_NO_FILTERS), since the counts are a GLOBAL per-entity distribution that wouldn't describe a filtered result set. (default false)"New value: +"Enables collection-GET filtering on this field via query operators (eq/ne/in/nin for enum/boolean/list/reference; eq/gt/gte/lt/lte for number/date/datetime; eq/starts word search plus exact for a whole value, for text). Results come from an async search index (small post-write lag) — see describe_project's `filtering` section or generate_openapi_spec for the exact operators/syntax this field supports once created. reference fields are always filterable regardless of this flag (except the system audit references _createdBy/_updatedBy/_deletedBy, which are never indexed) — enum and every other type require search:true. On an eligible type (enum/boolean/list/reference/date/datetime — not text/number), search:true ALSO automatically maintains a distinct-value counter for this field (no separate flag needed) — counts are returned under a `facets` key — {field: {value: count}} — only when the caller passes `?facets=true` (or `?facets=<thisFieldName>` to select just this field) on an UNFILTERED GET /{entity} (no query param other than limit/offset/facets); combining `facets=` with any real filter returns a clean 400 (FACETS_REQUIRES_NO_FILTERS), since the counts are a GLOBAL per-entity distribution that wouldn't describe a filtered result set. (default false)"
  3. Changed1 schema field changed
    • changedInput schema / properties / unique / description
      Previous value: -"Value must be unique within the tenant (default false)"New value: +"Value must be unique within the tenant, compared case-insensitively ('ABC-1' and 'abc-1' are the same value); a duplicate is a 409 DUPLICATE_VALUE, reported only after the value passes type/pattern/min/max validation (default false)"
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond annotations that mark it as a non-read-only, non-destructive, non-idempotent create, the description adds important behavior: type/cardinality/targets are permanent, stored=false cannot combine with search or unique, and stored=false requires external population. It also notes validation failures and async facet behavior.

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?

The action is front-loaded and clear sections separate type-choice guidance from computed/stored behavior. It is appropriately detailed for a 22-parameter schema, but some type guidance duplicates the schema and the final stored=false caveat could be tighter.

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 complex schema-creation tool, the description covers the critical type/cardinality choices, the users-entity exception, permanence, and computed/stored caveats. With 95% schema description coverage, the remaining parameter details are available; return-value and duplicate-name behavior are minor omissions rather than blockers.

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 95% and the schema already documents parameters thoroughly. The description adds decision-level semantics for type, multiple, targets, and the stored=false limitation, though most per-parameter syntax remains in the schema.

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 first sentence gives a specific verb and resource: 'Add a new field to an entity schema.' The rest distinguishes it from alternatives, including update_field for later changes and reference vs list for relationship modeling, so the tool's identity is clear.

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?

The description explicitly guides when to use reference with targets/multiple, when list is only for primitives, and says 'do NOT' store related IDs as text or list. It also covers the users entity exception, computed/stored decisions, and points to update_field for permanence boundaries.

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