Skip to main content
Glama

Add a document to a knowledge space

claix.spaces.add_document
Idempotent

Assign a knowledge space to a persisted document that has no space_id yet (POST /add-space). Requires document_id and space_id. Fails with 400 if the document already belongs to a space — call claix.spaces.remove_document first. Returns document_id, space_id, space_name, file_name, and version. Free call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAPI key secreta de Claix. Ejemplo: claix_sk_abc123.... Opcional si la conexión MCP envía x-api-key en cabecera HTTP (recomendado en Smithery/Cursor).
space_idYesUUID del espacio de conocimiento. Es el mismo valor que se envía como space_id opcional al extraer para agrupar documentos, y el que devuelve claix.spaces.create. Ejemplo: 5b9e2c14-7d3a-4f8b-9e1c-6a0d4b8f2e7c.
document_idYesUUID del documento persistido (document_id de una extracción con window_context). Ejemplo: 3c7a9f21-4b8e-4d1a-9c6f-2e0d8a5b7c4f.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoJSON payload from the Claix API (extracted records, schema list, or Excel export metadata).
errorNoHuman-readable error message when success is false.
successYesTrue when Claix returned a successful response. False when isError is set on the tool result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), and the description does not contradict them. It adds genuine context beyond the annotations: the precondition (no space_id), the specific 400 failure condition, and the cost note ('Free call'). Minor gaps (auth requirements) keep it from the top score.

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 core action and precondition, then the API endpoint, required inputs, failure mode with remedy, return fields, and cost. No wasted sentences and ideal ordering for an agent scanning it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool linked to remove_document, the description supplies the precondition, error behavior, alternative routing, and return fields. With an output schema present it needn't detail return values further, and nothing needed to call it correctly is missing.

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 the Spanish-language schema already documents all three parameters including UUID formats and examples. The description only restates that document_id and space_id are required, adding no meaning beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 (assign/add) and resource (a knowledge space to a persisted document) with a scoping constraint ('that has no space_id yet'). It contrasts cleanly with the sibling claix.spaces.remove_document, so an agent can distinguish it 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 Guidelines5/5

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

Explicitly covers when to use it (document with no space_id yet), when it fails (400 if the document already belongs to a space), and the corrective alternative ('call claix.spaces.remove_document first'). This is the full when/when-not/alternative triad.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources