Skip to main content
Glama

Document Update

document_update

Rename, move, or update metadata for a stored document by applying at least one mutation, including adding, replacing, or clearing metadata keys.

Instructions

Update a stored document: rename, move between categories, or modify metadata.

Provide at least one mutation. metadata_add, metadata_replace, and metadata_clear are mutually exclusive.

Arguments

  • session_id: string | null

    • Opaque Guide interaction identifier returned by set_project. Pass it through unchanged on later tool, prompt, and resource calls. Do not construct, alter, or treat it as a FastMCP transport session id.

  • category (required): string

    • Category the document belongs to

  • name (required): string

    • Document name to update

  • new_name: string | null

    • New document name. At least one mutation is required.

  • new_category: string | null

    • New category to move the document to. At least one mutation is required.

  • metadata_add: object | null

    • Metadata entries to merge into existing metadata. Mutually exclusive with metadata_replace and metadata_clear.

  • metadata_replace: object | null

    • Replace the entire metadata dict. Mutually exclusive with metadata_add and metadata_clear.

  • metadata_clear: array[string] | null

    • Metadata keys to remove. Mutually exclusive with metadata_add and metadata_replace.

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": {
      "args": "<args>"
    },
    "name": "document_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsYesArguments for document_update tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.0.0
    • removedInput schema / properties / args / additionalProperties
      Removed value: -false
    • changedInput schema / properties / args / properties / metadata_add / description
      Previous value: -"Metadata entries to merge into existing metadata"New value: +"Metadata entries to merge into existing metadata. Mutually exclusive with metadata_replace and metadata_clear."
    • changedInput schema / properties / args / properties / metadata_clear / description
      Previous value: -"List of metadata keys to remove"New value: +"Metadata keys to remove. Mutually exclusive with metadata_add and metadata_replace."
    • changedInput schema / properties / args / properties / metadata_replace / description
      Previous value: -"Replace entire metadata with this dict"New value: +"Replace the entire metadata dict. Mutually exclusive with metadata_add and metadata_clear."
    • changedInput schema / properties / args / properties / new_category / description
      Previous value: -"New category to move document to"New value: +"New category to move the document to. At least one mutation is required."
    • changedInput schema / properties / args / properties / new_name / description
      Previous value: -"New document name"New value: +"New document name. At least one mutation is required."
    • addedInput schema / properties / args / properties / session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Opaque Guide interaction identifier returned by set_project. Pass it through unchanged on later tool, prompt, and resource calls. Do not construct, alter, or treat it as a FastMCP transport session id."
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  2. First observedv1.3.2

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral load; it does disclose the mutation-count requirement and the mutual-exclusion constraint, which is real value. It does not say whether renaming onto an existing name fails or overwrites, whether multiple mutations in one call are atomic, what permissions are needed, or how errors surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The two-sentence lead is front-loaded and earns its place, but the Arguments section duplicates the input schema near-verbatim for eight parameters, adding bulk without new information. Structure is readable, yet roughly half the text is redundant with structured fields.

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 mutate-in-place tool with no annotations and no output schema, the description covers the inputs and the key call-shape constraints. It leaves out failure modes (missing document, conflicting rename) and what the caller gets back, which an agent needs to handle the result safely.

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 every argument, and the "## Arguments" block largely restates those same strings verbatim (session_id included word-for-word). The only added semantic content is the grouping of new_name/new_category as alternate mutations, which is already implied by the opening sentence.

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?

The opening sentence gives a specific verb plus resource and enumerates the three mutation shapes (rename, move, metadata). It does not distinguish this from the sibling `update_documents` (plural), leaving ambiguity about which update tool to call.

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?

It states a clear precondition ("Provide at least one mutation") and an explicit exclusivity rule between metadata_add, metadata_replace, and metadata_clear, which directly shapes how an agent should build the call. It stops short of saying when to prefer this over `update_documents` or when to use document_remove instead of clearing metadata.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.