Skip to main content
Glama

convert_doc

Converts Word documents (.docx) into structured text with LaTeX math formulas and image placeholders. Outputs text and image paths for further processing.

Instructions

Word(.docx / docx伪装的.doc)→ 结构化文本 + 题图清单。确定性 XML 解析(OMML→$LaTeX$),非 OCR。

产出文本里:数学公式=$LaTeX$;图=〖图:rId〗占位(与 images 的 rid 对应)。 下一步:文本喂 parse_paper_text 确定性拆题;images[].local_path 喂 upload_image 传 OSS。 参数: doc_path 卷子绝对路径;batch 批次名(图文件名前缀+文本落盘名,空=文件名主干)。 返回: {ok, text, paras, text_path, images:[{rid, local_path}]};真 OLE .doc → {ok:false, reason:"另存为 docx"}。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batchNo
doc_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavior: deterministic XML parsing, no OCR, output structure (text, paras, text_path, images with rid and local_path), and error handling for true .doc files. It explains the output format and next steps thoroughly.

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?

The description is well-structured and informative, starting with purpose, then output, next steps, parameters, and return value. However, it is somewhat lengthy; a minor trimming could improve conciseness without losing clarity.

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?

Given the presence of an output schema (as indicated in context signals), the description still provides a comprehensive overview of input, output, edge cases, and workflow. It covers all necessary information for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description compensates for 0% schema coverage by explaining doc_path as the absolute path to the file and batch as a prefix for image filenames and text file name, defaulting to the document filename stem. This adds significant meaning beyond the input 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 it converts Word documents (.docx or disguised .doc) to structured text and an image list, specifying the method (XML parsing, not OCR). It mentions math formulas to LaTeX and image placeholders, effectively distinguishing it from siblings like convert_pdf and convert_lecture_docx.

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?

The description provides clear guidance on next steps: feed text to parse_paper_text and images to upload_image. It also handles the true .doc case with an error message. However, it does not explicitly state when not to use this tool or compare it to alternatives, though the context implies the specific use case for Word documents.

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/RuntimeAll/teacher-mcp'

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