Skip to main content
Glama

Convert document into Docling document

convert_document_into_docling_document

Convert a PDF, DOCX, HTML, or image from a URL or local path into a structured Docling document for parsing and caching.

Instructions

Convert a document from a URL or local path into a Docling document.

Use this tool when you have an existing file (PDF, DOCX, HTML, image, etc.) that you want to load and parse.

This tool takes a document's URL or local file path, converts it using the configured converter (remote API or local), and stores the resulting Docling document in a local cache. It returns an output with a boolean set to False along with the document's unique cache key. If the document was already in the local cache, the conversion is skipped and the output boolean is set to True.

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": {
      "source": "<source>"
    },
    "name": "convert_document_into_docling_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesThe URL or local file path to the document. Object-storage URIs (abfs://, az://, gcs://, gs://, s3://) are supported when the matching provider extra is installed.

Output Schema

NameRequiredDescriptionDefault
from_cacheYes
document_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only provide readOnlyHint=false and destructiveHint=false. The description adds substantive behavior: conversion uses a configured remote or local converter, results are stored in a local cache, cache hits skip conversion, and the output boolean signals cache-hit status. This is consistent with the annotations.

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?

The purpose is front-loaded in one sentence, followed by when-to-use and cache/return behavior. There is no filler, and the structure makes the key information easy to scan.

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?

An output schema exists, so the description need not fully document the return payload, but it still clarifies the boolean and cache-key behavior. Source, conversion path, cache semantics, and rerun behavior are all covered adequately.

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%, and the schema already documents the source parameter including object-storage URI support. The description repeats URL or local path and adds file-type examples, but it does not add syntax or constraints beyond the schema, so the baseline 3 applies.

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, converting a document into a Docling document, and frames the scope around an existing file to load and parse. This distinguishes it from sibling tools such as create_new_docling_document and directory conversion.

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?

Explicitly says when to use it: an existing PDF, DOCX, HTML, image, etc. that the agent wants to load and parse. It does not explicitly name alternatives or when not to use it, so it stops short of full routing guidance.

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