Skip to main content
Glama

workspaces_context_fields_create

Adds a key to the workspace's lead context schema. Declare every field an enrichment writes or a filter or template reads before you create them, or the enrichment has nowhere to store its output. key must be unique in the workspace; field_type sets how the value is stored and filtered; use=true includes the value in the context the AI sees when it writes messages.

Method: POST /api/v1/workspaces/{workspace_sqid}/context-fields/

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": {
      "key": "<key>"
    },
    "name": "workspaces_context_fields_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
useNoUse for message generation.
keysNoComma-separated list of alternative keys for this field
orderNo
field_typeNo* `string` - String * `text` - Text * `number` - Number * `boolean` - Boolean * `date` - Date * `url` - URL * `phone_number` - Phone Number * `email` - Email * `choice` - Choice
descriptionNoExplain to AI what this field is about

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the uniqueness constraint on `key` and what `use=true` changes, but says nothing about what happens on a duplicate key (error vs. upsert), required permissions, or reversibility after creation.

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 action, then the prerequisite, then per-parameter notes; every sentence carries content. The trailing "Method: POST /api/v1/..." line adds little for an agent that already has the schema, and the third sentence packs three distinct clauses.

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

Completeness3/5

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

For a mutation with no annotations and no output schema, the definition covers purpose, prerequisite, and the two most consequential parameters. It is still thin on return behavior, conflict handling, and prerequisites like workspace permissions.

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

Parameters3/5

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

Schema coverage is 67%, and the description adds real meaning for `key` (uniqueness) and `field_type` (controls storage and filtering), but `keys`, `order`, and `description` are left to the schema alone. The explanation of `use` largely restates the schema's "Use for message generation".

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?

"Adds a key to the workspace's lead context schema" gives a specific verb plus resource and scope, so the agent knows this creates a new context field rather than mutating an existing one. It does not explicitly name the sibling mutators (partial_update, rename, bulk_set_type) to draw the line, which keeps it just short of a 5.

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?

Strong conditional guidance: declare every field that an enrichment writes or a filter/template reads *before* creating them, with the consequence spelled out ("the enrichment has nowhere to store its output"). No exclusions or named alternative tools are provided, so it is clear context rather than full routing guidance.

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.