Skip to main content
Glama

Import a document

begin_document_import
DestructiveIdempotent

Import an existing PDF, image, HTML file or direct HTTPS URL as a private document. Office and video are unsupported. File bytes must come from the authenticated embedded chooser or supported attachment transfer, never a local path. Replacing original requires documentId and current fileRevisionId as expectedRevisionId; preserves reader URL/access settings. A reserved job is not completed. URL fetch is explicit in complete_document_import.

Input Schema

NameRequiredDescriptionDefault
titleYes
sourceYes
replaceNo
htmlModeNostatic
workspaceIdNo
workspace_idNo
idempotencyKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • addedInput schema / properties / workspace_id
      Added value: +{
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is partly covered. The description adds real behavioral context beyond them: replacement needs the current revision as expectedRevisionId (optimistic concurrency), reader URL/access settings are preserved, a reserved job is not yet completed, and URL fetching is deferred to complete_document_import. Return format and failure modes remain unstated.

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 supported formats, then constraints, then the replacement and two-phase-job caveats. Every sentence carries distinct information with no filler.

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 7-parameter, nested-schema mutation with no output schema, it conveys the workflow shape well (reserve now, complete later) and the replacement contract. It is not fully complete: several parameters (htmlMode, workspaceId, idempotencyKey) are undocumented, though status/return info is delegated to sibling tools.

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 parameter meaning, and it only partly does: it explains the replace path (documentId plus current fileRevisionId as expectedRevisionId) and implies source.kind='url'. It says nothing about htmlMode's static/interactive enum, workspaceId, idempotencyKey, title, or declaredBytes, leaving several params undocumented.

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+resource ('Import an existing PDF, image, HTML file or direct HTTPS URL as a private document') and immediately bounds scope by naming unsupported types (Office, video). This clearly separates it from siblings like create_document and complete_document_import without opening a 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?

Gives concrete when/when-not guidance: file bytes must originate from the authenticated embedded chooser or supported attachment transfer, never a local path, and Office/video are unsupported. It also routes the URL-fetch follow-up to complete_document_import. It stops short of explicitly contrasting against the nearest sibling (create_document) or stating prerequisites like permissions.

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