Skip to main content
Glama
ragflow-kb-mcp
by feci

ragflow_update_metadata

Set or remove metadata across multiple RAGFlow dataset documents, with optional filters by document IDs or metadata conditions to bulk update only matching records.

Instructions

Set or remove metadata on many documents of a dataset at once.

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": {
      "dataset_id": "<dataset_id>"
    },
    "name": "ragflow_update_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
deletesNoKeys to remove: [{"key": ..., "value": optional}]
updatesNoValues to set: [{"key": ..., "value": ..., "match": optional current value}]
dataset_idYesDataset (knowledge base) ID
document_idsNoLimit the change to these documents
all_documentsNoRequired to change every document when no selector is given
metadata_conditionNoSelect documents by metadata, e.g. {"logic": "and", "conditions": [{"name": "author", "comparison_operator": "is", "value": "alice"}]}

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.1/5.0
Behavior2/5

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

The annotations already declare readOnly=false, destructiveHint=false and openWorld=false, so the safety profile is covered. However, the description says nothing about the guard requiring all_documents when no selector is given, what happens if both updates and deletes fire against the same key, or whether removal is reversible — material context for a bulk mutation that plausibly removes data while destructiveHint says false.

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?

One compact sentence, front-loaded with the action and scope, with no filler. It is efficient to the point of being under-specified, but nothing in it wastes space.

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

Completeness2/5

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

With six parameters, three alternative selectors (document_ids, all_documents, metadata_condition) and an output schema present, the description should at minimum explain the selection contract and the update/delete semantics. Instead it leaves all of that to the schema, so an agent calling this on a whole dataset could easily misfire.

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 every parameter including the match semantics of updates and the metadata_condition shape is already documented in the schema; baseline 3 applies. The description adds no additional parameter meaning such as how document_ids, all_documents and metadata_condition interact.

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 description names a specific action pair (set or remove), the resource (metadata), and the scope (many documents of a dataset at once), so an agent knows this is a bulk metadata mutation rather than a document edit. It does not name or distinguish itself from siblings like ragflow_update_document or ragflow_metadata_summary, which lowers it from 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"On many documents of a dataset at once" implies bulk usage and the existence of a selection step, but the description never says when to prefer this over ragflow_update_document or how selection modes relate to each other. No explicit when-not or prerequisites are stated; the guidance is only implied by the phrase 'at once'.

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