Skip to main content
Glama
Unilytics MCP Server

Unilytics MCP Server

Official

kb_add_file

Creates a knowledge base document from a file already uploaded via a signed ID, extracting, chunking, and embedding its text in the background so you can track progress and retry failures.

Instructions

Step 2 of a two-step file upload: create the KB document from a file already PUT to the upload_url from kb_create_direct_upload (signed_id). The file's full text is extracted, chunked and embedded in the background. Returns {document_id, status}; kb_get_status reports progress. A file that can't be read, or holds more text than one document can (about 5 million characters), ends as status 'failed' with error saying why; it keeps its document_id, and kb_retry_document re-runs it in place.

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>",
      "signed_id": "<signed_id>",
      "name": "<name>"
    },
    "name": "kb_add_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
metadataNo
signed_idYes
project_idYes
collection_idYes
document_typeNo

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 beyond the annotations: discloses that extraction/chunking/embedding happens in the background, that the call returns {document_id, status}, that oversized or unreadable files end as 'failed' with an error but retain their document_id, and that kb_retry_document re-runs in place. That is exactly the failure/async behavior an agent needs and annotations cannot express.

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?

Front-loaded with the pipeline position and the key input, then return shape, then failure semantics. Four dense sentences with no filler; every clause (including the ~5 million character limit) contributes actionable information.

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 an asynchronous mutation tool with a clear return contract and documented failure/retry path, the description covers most of what an agent needs, and annotations supply the safety profile. The remaining gap is the undocumented metadata/document_type/collection_id parameters, which matter for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% across six parameters, and the description only clarifies the trickiest one, signed_id, by tying it to kb_create_direct_upload. name, project_id, collection_id, metadata, and document_type are left with no meaning anywhere in the definition, including the nested metadata object.

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 ('create the KB document') and frames it precisely as 'Step 2 of a two-step file upload', naming kb_create_direct_upload as the producer of the signed_id. An agent can immediately distinguish this from step 1 and from kb_write_text/kb_add_urls.

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?

Gives an explicit prerequisite (file already PUT to the upload_url from kb_create_direct_upload) plus clear follow-up routing: kb_get_status for progress and kb_retry_document for failed documents. It does not explicitly state when not to use this tool (e.g., text via kb_write_text, URLs via kb_add_urls), which keeps it just short of a 5.

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