Skip to main content
Glama

Create custom field value

create_custom_field_value

Create (upsert) a custom field value for an entity. The table stores values in typed columns - prefer setting the one that matches the field definition's field_type: value_text (text/select; a select value must be one of the field's options), value_number (number), value_date (date, ISO YYYY-MM-DD), value_boolean (boolean). Alternatively pass a single value string and the server will dispatch it to the right column based on field_type. Writes upsert on (entity_id, field_definition_id) so replaying a batch is idempotent. Requires custom_fields:write scope.

Input Schema

NameRequiredDescriptionDefault
valueNoLegacy single-value shim - server dispatches to the correct typed column based on the field definition's field_type. Ignored if any value_* typed column is set.
entity_idYesEntity ID - e.g. asset.id, work_order.id (required)
value_dateNoDate value, ISO YYYY-MM-DD (use for field_type=date)
value_textNoText value (use for field_type=text or select)
value_numberNoNumeric value (use for field_type=number)
value_booleanNoBoolean value (use for field_type=boolean)
field_definition_idYesCustom field definition ID - resolve via list_custom_field_definitions (required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / entity_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedInput schema / properties / field_definition_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  2. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / entity_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • removedInput schema / properties / field_definition_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  3. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / entity_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedInput schema / properties / field_definition_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  4. First observed

TDQS

B3.2/5.0
Behavior1/5

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

The description asserts 'writes upsert on (entity_id, field_definition_id) so replaying a batch is idempotent', but the annotations declare idempotentHint=false. An agent reading both gets contradictory signals about whether repeated calls with identical arguments are safe, so the description actively undermines the structured hint.

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?

Purpose is front-loaded in the first clause, followed by the typed-column guidance, the shim alternative, the upsert note, and the scope requirement. It is a little long and restates some schema text, but every sentence conveys operational information.

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 7-parameter, 100%-documented, annotation-bearing write tool with no output schema, the description covers scope requirements, column selection, and the shim fallback well. It omits what the call returns (e.g. the created row ID), which is a minor gap given no output schema exists.

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 already 100%, so the schema carries the field-by-field documentation. The description still adds genuine meaning beyond it: the select constraint ('a select value must be one of the field's options'), the dispatch mechanics of the legacy `value` shim, and which typed column maps to which field_type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: create/upsert a custom field value for an entity, with the storage model spelled out (typed columns). It is clearly distinguishable from generic create_* siblings, but never distinguishes itself from the very close update_custom_field_value/delete_custom_field_value, and the '(upsert)' framing blurs the create-vs-update line.

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

Usage Guidelines3/5

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

Provides a real prerequisite (requires custom_fields:write scope) and steers the caller toward the typed column over the legacy shim, which is useful context. It never states when to call this versus update_custom_field_value or list_custom_field_definitions, so tool-selection guidance remains implied rather than explicit.

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