Skip to main content
Glama

Chat with AnythingLLM Workspace

chat_workspace

Run RAG chat or strict vector-grounded queries against an AnythingLLM workspace, with optional session partitioning and history reset.

Instructions

Execute a workspace RAG chat or strict vector-grounded query (POST /api/v1/workspace/:slug/chat). Supports chat, query, and automatic modes plus optional sessionId partitioning.

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": {
      "slug": "<slug>",
      "message": "<message>"
    },
    "name": "chat_workspace"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoConversation mode: 'query' (strict RAG from workspace embeddings), 'chat' (LLM + embeddings + rolling history), or 'automatic'. Defaults to the workspace setting.
slugYesUnique workspace slug to chat with.
resetNoWhen true, resets the workspace chat session history.
messageYesPrompt or question to send to the workspace.
sessionIdNoOptional external session identifier to partition chat history.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the agent knows this is a non-idempotent, open-world call. The description adds useful context about session partitioning and mode semantics, but says nothing about latency/cost of an LLM round-trip, auth requirements, or what 'reset' destroys.

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?

Two tight sentences, front-loaded with the action and endpoint before the mode/session qualifiers. No filler, though the raw endpoint path slightly crowds out behavioral detail.

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?

No output schema exists, so the description should ideally hint at the response shape (answer text, sources, session state) and at how 'reset' interacts with history. For a five-parameter, non-idempotent chat tool, the definition is adequate but thin on return-value expectations.

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 all five parameters are already documented with enum values and length constraints. The description only echoes the mode and sessionId concepts, adding no syntax or format detail beyond the schema — 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?

States a specific verb and resource ('Execute a workspace RAG chat or strict vector-grounded query') and pins it to the concrete endpoint POST /api/v1/workspace/:slug/chat. The chat-vs-query distinction implicitly separates it from the vector_search_workspace sibling, though the sibling is never named.

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?

Usage is only implied via the mode list ('chat, query, and automatic'); the description never says when to pick this over vector_search_workspace or get_workspace, nor when to choose 'query' versus 'chat'. The mode meanings live in the schema, not the prose.

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