Skip to main content
Glama

Update the user facts document

update_user_facts
DestructiveIdempotent

Updates the user's durable facts document with a JSON merge patch (set paths to values; null deletes a path). The document is injected into the first recall_context of every new conversation, so its quality matters more than its completeness.

WHAT THE DOCUMENT HOLDS (instruction set v1.2):

  • Durable truths about the user, their people, businesses or infrastructure — spouse name, company names, staging URL, signature preferences. Session-specific, task-specific or time-boxed material does not belong here; store_context is what records those.

  • Data, never rules. "wife.name: Nicole" is a fact; "never fabricate a last name" is an instruction and does not belong here — this document must never become a second instruction channel.

  • Corrections rather than accretion: where a new fact conflicts with an existing one, the old path is overwritten or deleted rather than accumulating a variant.

Conventions: loose top-level keys — user, family, companies, infrastructure, preferences. Hard size cap ~4KB on the merged document; a write that would exceed the cap is rejected (prune stale paths with null first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
facts_patchYesJSON merge patch (RFC 7386): nested objects merge, scalars/arrays replace, null deletes the path. Example: {"family":{"wife":{"name":"Nicole"}},"infrastructure":{"staging_url":"https://api-stage.example.com"}}

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNoPresent when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.
messageNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "facts": {
      +          "additionalProperties": true,
      +          "description": "The complete facts document after the patch was merged.",
      +          "type": "object"
      +        },
      +        "size_bytes": {
      +          "type": "integer"
      +        },
      +        "updated_at": {
      +          "description": "Unix epoch milliseconds.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "description": "Present when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.",
      +      "type": [
      +        "object",
      +        "boolean",
      +        "string"
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Even though annotations already mark destructiveHint=true and idempotentHint=true, the description adds meaningful behavioral context: null deletes paths, the document is injected into future recall_contexts, writes over ~4KB are rejected, and corrections overwrite rather than accumulate. This explains the consequences of a write beyond what the annotations convey.

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 description is front-loaded with the operation and its key consequence, then uses clear headings to organize content policy. It is longer than average but every section earns its place for a tool with delicate usage rules; minor trimming of labels like 'instruction set v1.2' would tighten it slightly.

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 mutation tool with one parameter and an output schema, the description covers the operation, document content rules, merge semantics, size limits, failure behavior, and relationship to sibling tools. An agent has everything needed to invoke it correctly and avoid common misuse.

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?

The single parameter has 100% schema description coverage with RFC 7386 semantics and a concrete example. The description restates 'set paths to values; null deletes a path' but does not add meaning beyond the schema; the baseline 3 applies because the schema already handles parameter documentation.

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 description opens with a specific verb and resource: 'Updates the user's durable facts document with a JSON merge patch.' It immediately clarifies the exact mutation mechanism and distinguishes the document from session-specific storage by stating it is injected into every new conversation's recall_context.

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?

It explicitly tells the agent what belongs in this document (durable truths) and what does not (session-specific, task-specific, time-boxed material), and names store_context as the alternative for excluded content. It also adds the rule 'Data, never rules,' which prevents misuse.

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