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

ragflow_openai_chat_completion

Send OpenAI-style messages or a question to a RAGFlow chat assistant and retrieve its answer, optionally with source chunks, without storing a session.

Instructions

Ask a chat assistant through its OpenAI-compatible endpoint; no session is stored.

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": {
      "chat_id": "<chat_id>"
    },
    "name": "ragflow_openai_chat_completion"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesChat assistant ID
messagesNoOpenAI-style messages [{role, content}], last one from the user
questionNoShortcut for a single user message
max_tokensNo
temperatureNo
include_referenceNoReturn the chunks the answer used
metadata_conditionNoMetadata filter for retrieval

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description adds genuinely new behavioral context — that no session is persisted — which tells the agent the call is stateless and history will not accumulate. It stops short of covering auth prerequisites or what happens when both messages and question are supplied.

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?

A single front-loaded sentence with a useful qualifier clause; nothing is wasted or buried. It is arguably over-terse for a 7-parameter tool, but no sentence fails to earn its place.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. Still, for a 7-parameter completion endpoint the description leaves key gaps: the messages/question relationship, behavior when neither is provided, and how this differs from the sibling completion tools.

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 71%, so most parameters (chat_id, messages, question, include_reference, metadata_condition) are already documented in the schema. The description adds no parameter meaning at all — notably not the messages-vs-question precedence or whether either is required alongside chat_id — so the baseline 3 applies.

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 states a specific action (ask a chat assistant) and a specific mechanism (OpenAI-compatible endpoint), which concretely distinguishes it from a native chat call. It does not name the siblings it competes with (ragflow_chat, ragflow_search_app_completion, ragflow_agent_chat), so an agent must infer the boundary rather than read it.

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?

'No session is stored' implies stateless, single-shot usage, which is a usable selection signal versus the session-based siblings. However, there is no explicit when-to-use / when-not-to-use statement and no alternative named, so the routing decision is left to inference.

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