Skip to main content
Glama

Update Fact Definition

lexq_facts_update
Destructive

Update a fact definition. The key is immutable. The type can change only while no rule references the fact; if any does, the call fails with FD-007 and reports the count. Only the fields you send are changed. System facts accept name, description, and PII only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDisplay name
typeNoValue type. Omit to leave it unchanged. Changing it fails with FD-007 while any rule references the fact.
isPiiNoPII flag — enables/disables masking (changeable even on system facts)
factIdYesFact definition ID
isRequiredNoRequired flag
descriptionNoDescription
valueDomainNoWhich values this fact accepts. Three states: omit the field to leave the constraint alone, send {} to remove it, or send a populated object to replace it. Narrowing it does not rewrite rules that already reference this fact — they keep working, and the next save is judged against the new constraint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / valueDomain
      Added value: +{
      +  "description": "Which values this fact accepts. Three states: omit the field to leave the constraint alone, send {} to remove it, or send a populated object to replace it. Narrowing it does not rewrite rules that already reference this fact — they keep working, and the next save is judged against the new constraint.",
      +  "properties": {
      +    "allowedValues": {
      +      "description": "Accepted values. For list types the constraint applies to each element, not to the list as a whole.",
      +      "items": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "type": "array"
      +    },
      +    "max": {
      +      "description": "Upper bound, inclusive. Numeric types only.",
      +      "type": "number"
      +    },
      +    "min": {
      +      "description": "Lower bound, inclusive. Numeric types only.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. 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 / factId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "Value type. Omit to leave it unchanged. Changing it fails with FD-007 while any rule references the fact.",
      +  "enum": [
      +    "STRING",
      +    "NUMBER",
      +    "BOOLEAN",
      +    "LIST_STRING",
      +    "LIST_NUMBER"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / isPii
      Added value: +{
      +  "description": "PII flag — enables/disables masking (changeable even on system facts)",
      +  "type": "boolean"
      +}
  4. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "factId",
      -  "name",
      -  "isRequired"
      -]New value: +[
      +  "factId"
      +]
  5. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations set destructiveHint=true and readOnlyHint=false, indicating a mutation operation. The description adds valuable context: the key is immutable, type changes fail with FD-007 if rules reference the fact, only sent fields are changed, and system facts have field restrictions. This goes beyond annotations by explaining failure modes and partial update behavior.

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 three concise sentences with no waste, front-loading the key immutability and type change condition. Each sentence earns its place by conveying critical behavioral rules.

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?

Given the mutation nature (destructiveHint=true), the description covers key constraints like immutability, error codes, partial updates, and system fact limitations. However, it doesn't mention permissions or side effects beyond rule references. With no output schema and rich input schema, it is largely complete but could note authorization requirements.

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 description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some meaning by noting that only sent fields are changed and system facts accept limited fields, but it does not provide additional parameter details beyond the schema, which already covers types, value domains, and constraints.

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 (Update) and resource (fact definition), matching the title. Sibling tools like lexq_facts_create, delete, and list are distinct from update, so differentiation isn't strictly necessary here. The purpose is clear, though it doesn't explicitly contrast with similar tools like lexq_facts_action_metadata.

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?

The description provides some usage context, such as the immutability of the key and type change restrictions, but does not explicitly state when to use this tool versus alternatives like lexq_facts_create or lexq_facts_delete. It implies usage for modifying existing facts but lacks direct guidance on alternatives.

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