Skip to main content
Glama
Unilytics MCP Server

Unilytics MCP Server

Official

kb_update_document_metadata

DestructiveIdempotent

Replace a document’s entire metadata hash to update or remove filterable key/value fields without merging or re-embedding content.

Instructions

Replace a document's metadata (single-level key/value hash) in full — no merge, no re-embed. To remove a key, pass the full new hash without it. Filterable via kb_search.

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": {
      "project_id": "<project_id>",
      "document_id": "<document_id>",
      "metadata": "<metadata>"
    },
    "name": "kb_update_document_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
metadataYes
project_idYes
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • removedInput schema / properties / config
      Removed value: -{
      -  "default": null,
      -  "title": "config",
      -  "type": "string"
      -}
  2. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the bar is lower; the description still adds real value by clarifying that 'destructive' here means wholesale metadata replacement rather than document loss, and that no re-embedding occurs. Missing detail on permission requirements or behavior on invalid/nested values.

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?

Two short sentences, front-loaded with the replacement semantics, then the removal recipe and the search connection. No repetitive or filler wording.

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 three-parameter mutation with no output schema, the description covers the risky semantics (full replace, destructive scope, no re-embed, key deletion). A brief note on accepted value types or whether metadata keys must be pre-registered for filtering would close the remaining gap.

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 coverage is 0%, so the description must carry meaning, and it does for the critical parameter: metadata is a single-level key/value hash that replaces rather than merges, with key removal handled by omission. project_id and document_id remain undefined, though they are conventional identifiers.

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 ('Replace a document's metadata') and adds scope detail (single-level key/value hash, full replacement). It does not name kb_update_document as the alternative, so differentiation from the sibling that presumably edits document content is left to inference.

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?

Implies usage through 'To remove a key, pass the full new hash without it' and 'Filterable via kb_search', which tells the agent when the metadata becomes useful. It never explicitly says when to choose this over kb_update_document or whether a document must exist/be indexed first.

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

Deploy Server

Other Tools