Skip to main content
Glama

set_unit_custom_field

Sets (creates or updates) a custom field on a stock line by unit id. Field names are reused company-wide; new names are created with Unit scope. showInTable shows the field as a column on unit lists. Returns the saved field.

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": {
      "unitId": "<unitId>",
      "fieldName": "<fieldName>",
      "value": "<value>"
    },
    "name": "set_unit_custom_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
unitIdYes
fieldNameYes
showInTableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose genuinely non-obvious behavior: field names are reused company-wide, new names are created with Unit scope, and showInTable controls column visibility on unit lists. It also states the return ('the saved field'). It omits permissions/authorization requirements and what happens to an existing value on update, which keeps it from a 5.

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?

Four short sentences, front-loaded with the core action, then semantics, then side effects, then return value. No filler, no restatement of the tool name, and every sentence supplies information the schema does not.

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 4-parameter mutation tool with no annotations and no output schema, this covers the essentials: what it mutates, the global name-reuse side effect, the scope of new names, the UI flag, and the return. Missing authorization/prerequisite info and value formatting are the remaining gaps.

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 0%, so the description must compensate, and it does for most parameters: unitId is scoped to a stock line/unit, fieldName gets its company-wide reuse and Unit-scope creation semantics, and showInTable is explained as a unit-list column toggle. Only 'value' is left semantically bare (string format/validation unexplained), and the showInTable default of true is not restated.

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: 'Sets (creates or updates) a custom field on a stock line by unit id.' The upsert framing and the 'by unit id' scope make it distinguishable from the item-level siblings (set_inventory_item_custom_field, set_inventory_item_custom_field_by_name), though it never names those alternatives explicitly.

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?

Usage is implied rather than stated: the parenthetical 'creates or updates' tells the agent it is an upsert, but there is no explicit 'use this when...' guidance, no exclusions, and no routing to the item-level or name-based sibling tools.

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