Skip to main content
Glama
ActaLumen

@actalumen/mcp-server

Official
by ActaLumen

get_document

Retrieve document status and metadata after upload. Use to poll until status is READY before proceeding with verification or chat.

Instructions

Get a document's status and metadata. Use this to poll after upload — call start_verification or chat_with_document only when status is READY. Status values: PROCESSING (embeddings running), READY (queryable), FAILED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYesDocument ID returned by upload_document.

Implementation Reference

  • The get_document tool definition with the handler that calls GET /v1/documents/:documentId
    export const getDocument = defineTool({
      name: "get_document",
      description:
        "Get a document's status and metadata. Use this to poll after upload — call start_verification or chat_with_document only when status is READY. Status values: PROCESSING (embeddings running), READY (queryable), FAILED.",
      inputSchema: Input,
      handler: async ({ documentId }, { client }) => client.get(`/v1/documents/${encodeURIComponent(documentId)}`),
    });
  • Zod schema for the input: requires a documentId string
    const Input = z.object({
      documentId: z.string().describe("Document ID returned by upload_document."),
    });
  • The getDocument tool is exported as part of the tools array in index.ts
    export const tools: ToolDef[] = [
      uploadDocument,
      getDocument,
      listDocuments,
      listTemplates,
      startVerification,
      getVerification,
      chatWithDocument,
      getUsage,
    ];
  • The defineTool helper used to create the get_document tool definition
    export function defineTool<Input extends z.ZodTypeAny>(t: {
      name: string;
      description: string;
      inputSchema: Input;
      handler: (input: z.infer<Input>, ctx: ToolContext) => Promise<unknown>;
    }): ToolDef {
      return t as unknown as ToolDef;
    }
Behavior4/5

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

No annotations exist, so description carries burden. It explains status values and polling nature, implying read-only behavior. However, lacks explicit mention of no side effects and doesn't detail return metadata beyond status.

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 sentences, front-loaded with purpose, no extraneous information. Efficient and well-structured.

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 simple polling tool, description provides essential context: status values and workflow. Lacks output schema, but describes 'status and metadata' sufficient for basic use. Could improve by detailing metadata structure.

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 100% with parameter described. The description adds no additional parameter semantics beyond the schema, so baseline 3 is appropriate.

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 states the verb 'Get' and resource 'document's status and metadata'. It distinguishes from sibling tools by specifying when to use others (only when status is READY), providing clear differentiation.

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 advises to 'poll after upload' and warns not to call other tools until status is READY. Also explains status values, giving clear context for when to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ActaLumen/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server