Skip to main content
Glama
Unilytics MCP Server

Unilytics MCP Server

Official

kb_retry_document

Retry ingestion of a failed document in place while keeping its document_id, re-reading the file, re-embedding pasted text, or re-fetching the web page.

Instructions

Re-run ingestion of a failed document in place, keeping its document_id: an uploaded file is read again, pasted text re-embedded, a web page re-fetched. Returns {document_id, status}; kb_get_status reports the outcome. A failure on Unilytics' side usually succeeds on a retry; a file that failed because of its content (unreadable, too long) fails the same way again, since the retry reads the same file (a fixed file is a new upload: kb_create_direct_upload + kb_add_file). Only a failed document can be retried, at most 10 times: a refusal is error 'invalid_request' with its document_id, document_status and a reason of BUSY (still processing), NOT_FAILED, RETRY_LIMIT or CONFLICT (changed during the retry).

Input Schema

NameRequiredDescriptionDefault
project_idYes
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the 10-attempt retry cap, the exact error shape ('invalid_request' with document_id, document_status, and reason), and the four refusal reasons BUSY/NOT_FAILED/RETRY_LIMIT/CONFLICT. The annotations already flag non-read-only and non-idempotent, and the description is consistent with that; the only minor gap is that it does not say whether a retry can be issued concurrently or what happens to partial state.

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-loads the core action and the return shape before the caveats, and every clause carries information. The long parenthetical about error reasons is dense but justified; a bulleted structure would read slightly better.

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?

With no output schema, the description supplies the return shape ({document_id, status}) and points to kb_get_status for the outcome. Combined with the failure-mode and retry-limit disclosure, an agent has everything needed to call this correctly and interpret refusals.

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 coverage is 0%, so the description must carry the parameter burden. It does explain document_id meaningfully (must reference a failed document, is preserved across the retry), but project_id is never mentioned and neither parameter's format is clarified. Partial compensation for a low-coverage 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?

States a specific verb and resource ('Re-run ingestion of a failed document in place, keeping its document_id') and immediately enumerates what re-running means for each source type (file re-read, pasted text re-embedded, page re-fetched). This is clearly distinguishable from the sibling creation path it names.

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 scopes use to failed documents only, and states when NOT to use it: a content-caused failure will fail identically, and a fixed file must go through kb_create_direct_upload + kb_add_file instead. The alternative path is named with the condition that selects it.

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