Skip to main content
Glama
Unilytics MCP Server

Unilytics MCP Server

Official

kb_write_text

Writes inline text or Markdown into a knowledge base, returning a document ID and status while embedding runs in the background for later search and retrieval.

Instructions

Write an inline text/markdown document into a KB (research summary, agent output, notes). Returns {document_id, status}. Ingestion embeds the content in the background; kb_get_status reports when it is 'ready', and kb_search returns only ready documents. metadata is a single-level key/value hash, filterable in kb_search. Text from a file fits here too (MD, CSV, TXT, or text a code sandbox extracted from a PDF or PPTX): the text only, without images or layout; the original file goes in with create_upload_link or kb_create_direct_upload.

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>",
      "collection_id": "<collection_id>",
      "name": "<name>",
      "content": "<content>"
    },
    "name": "kb_write_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
contentYes
metadataNo
project_idYes
collection_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

A4.3/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false, idempotentHint=false) by disclosing the return shape {document_id, status}, explaining that ingestion/embedding is asynchronous, and that only 'ready' documents surface in kb_search. That background-processing model is exactly the behavior an agent cannot infer from structured fields and would otherwise get wrong by searching immediately.

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?

Front-loaded with the action and the return shape, then layered with lifecycle and metadata notes in a sensible order; nearly every clause carries new information. The final sentence is long and packs the file-handling exception into one dense parenthetical, which costs a little readability.

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 5-parameter write tool with no output schema, it covers the important unknowns: what is returned, when results become visible, and how metadata is shaped. The remaining gap is the unexplained project_id/collection_id scoping, presumably inferable from related KB tools but not stated here.

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 0%, and the description only compensates for part of it: it defines metadata as a single-level key/value hash that kb_search can filter on, and constrains content to plain text/markdown without images or layout. The name, project_id, and collection_id parameters receive no explanation at all, so a caller must guess the project/collection scoping model.

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?

States a specific verb and resource ("Write an inline text/markdown document into a KB") and immediately bounds the input type. The example payloads (research summary, agent output, notes) and the contrast with binary/layout content make it distinguishable from the sibling upload tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Clearly routes the file case elsewhere: text-only goes here, the original file goes through create_upload_link or kb_create_direct_upload. It also ties itself into the lifecycle by naming kb_get_status and kb_search as the follow-on tools. It does not address every plausible alternative (e.g. kb_add_file or kb_add_urls), so it stops short of full when/when-not coverage.

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