Skip to main content
Glama
smnspz

anythingllm-rag

by smnspz

Write curated context to a workspace

rag_write

Embed markdown documents into an AnythingLLM workspace with automatic vectorization. Overwrite existing entries by title to keep RAG context current and avoid stale duplicates.

Instructions

Embed a curated markdown doc into a workspace (raw-text + auto-embed). If overwrite=true (default), removes any existing embedding with the same title first to avoid stale duplicates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesWorkspace slug (from rag_find/rag_create_workspace)
titleYesCanonical doc name, e.g. 'architecture.md'
contentYesMarkdown content
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It does well by stating that overwrite=true is the default and that existing embeddings with the same title are removed first to avoid stale duplicates. It also mentions 'raw-text + auto-embed' as the write behavior, though it does not cover failure modes or return 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 concise sentences with no filler. The primary action and format are front-loaded, and the important overwrite behavior is stated immediately after in a clear conditional.

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 write tool with no annotations or output schema, the description covers the essential behaviors: what is written, how it is embedded, and the default overwrite semantics. It does not explain return values or error cases, but the description is reasonably complete for an agent to select and invoke the tool correctly, especially with the schema covering required parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, leaving the overwrite parameter semantically bare. The description compensates by explicitly stating that overwrite defaults to true and by explaining its effect: removing an existing embedding with the same title before writing. This is high-value meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies a write/embed operation for a curated markdown doc into a workspace, with the verb 'embed' and the resource 'workspace.' It is obviously distinct from sibling tools like rag_find/rag_search (reads), rag_forget (deletion), and rag_create_workspace (workspace creation), even though those names are not explicitly mentioned.

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 implied: this tool is for writing or curating context into a workspace. However, there is no explicit guidance about when to choose rag_write over rag_forget or rag_create_workspace, nor are alternatives named or exclusions stated.

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