Skip to main content
Glama

文档转换

generate_document

Convert PDF documents to Markdown, TeX, or DOCX by submitting processing tasks.

Instructions

提交文档处理任务(如 Doc2X:PDF→md/tex/docx)。 先用 describe_model 确认该 model 的参数。默认等待 60s:短任务直接返回结果 URL;长任务超时返回 task_id,用 get_task 继续查询。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id
paramsYes请求参数对象(不含 model),如 {prompt, aspect_ratio, ...},见 describe_model
inline_imageNo图像成功时是否内联回传图片(默认 true,仅 generate_image 生效;大图自动降级为纯 URL)
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id
Behavior3/5

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

No annotations provided, so description must disclose behavior. It covers async execution and timeout behavior, but includes the 'inline_image' parameter with a note that it only applies to generate_image, which is confusing for this document tool. Does not mention failure handling or credential needs.

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 concise sentences that front-load the purpose and immediately provide actionable guidance. No wasted words.

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?

Given no output schema, the description explains return values (URL or task_id) and workflow. However, it does not address errors or credits, and the inline_image parameter seems out of place. Still, the core async behavior is well-covered.

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 descriptions for all 4 parameters. The description adds context about using describe_model for params and explains wait_seconds, but the inline_image parameter's note is misleading. Overall, marginal value added beyond 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?

The description clearly states the tool submits document processing tasks (PDF to md/tex/docx) with a specific verb '提交' and resource '文档处理任务'. It distinguishes from sibling tools like generate_audio, generate_image, etc., by focusing on document conversion.

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?

Explicit guidance: use describe_model first to confirm parameters, default wait 60s, short tasks return URL, long tasks return task_id for get_task. It also explains wait_seconds behavior and mentions get_task as a follow-up.

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/cookaihq/aihub-mcp'

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