Skip to main content
Glama

convert_lecture_docx

Convert lecture docx files into Tiptap content with knowledge graph targets, sections, and image placeholders for understanding mapping. Supports assist and auto modes.

Instructions

讲义 docx → 忠实 Tiptap 内容 + KG 知识点靶子 + 图清单(确定性,零 login,零落库)。理解式映射的原料台。

🔴 崔崔版式实测=模块(H3)>分组(H3)>知识点(H4),纯确定性 H3 切片对不上 KG 知识点 → 默认 mode='assist': 工具只做忠实转换 + 按顶层 H3 分段 + 给出该课时 KG 知识点靶子,切成知识点由 agent 理解式映射 (读 raw_path 全文,按 kg_targets 重组讲解成片段 IR,习题模块的题走 ingest_items 拿 qid 后挂 kgExample)。 mode='auto':仅当来源 H3 已== KG 知识点名(已清洗源)才用——跑确定性 split_frags + 对齐闸,直接产 IR。 🔴 图不在此上传:content 里 image.src=〖图:rId〗占位 + rid;images[].local_path 喂 upload_image 拿 ossUrl, save_lecture_frag(image_map={rid:ossUrl}) 回填。忠实转换细节:heading/paragraph 留 bold/italic/color、 表 w:shd→背景色、单元格内图、图 EMU→px 内容区 clamp、EMF/WMF 矢量图无 local_path(浏览器不支持)。 参数: docx_path : 讲义 docx 绝对路径 course_subject_id : 课时 L4 subject_id(如 901001002001)——KG 知识点靶子来源 book_id : 教辅套 id(崔崔=CC7S) batch : 产物落盘名前缀(空=docx 文件名主干) mode : 'assist'(默认,理解式原料) | 'auto'(确定性 H3 切片,仅清洗源可用) | 'cuicui'(崔崔适配器) 返回(assist): {ok, mode, course, kg_targets:[{id,name}], sections:[{h3,node_count,preview,start,end}], images:[{rid,local_path}], raw_path, stats, deterministic_hint:{toc,unmatched_h3,frags}} ← 后者是 H3 切片试探,崔崔版必 FAIL 仅供参考。 返回(auto): {ok, mode, course, frag_count, frags, toc, unmatched_h3, images, ir_path, stats}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoassist
batchNo
book_idNoCC7S
docx_pathYes
course_subject_idYes

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 provided, the description carries the full burden and delivers comprehensive behavioral transparency. It explains the deterministic nature, no login, no storage, faithful conversion details (formatting retention, table backgrounds, image handling, EMU to px conversion, EMF/WMF limitation). It also outlines the return structures for each mode, including the deterministic_hint for assist mode.

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 about 600 characters and contains all necessary information, but it is somewhat verbose and uses a mixed format of bullet points and paragraphs. The main purpose is front-loaded, but the detailed explanation could be more organized. Still, it is efficient relative to the complexity of the tool.

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 tool's complexity (multiple modes, multiple output structures, dependencies on other tools like upload_image and save_lecture_frag), the description is remarkably complete. It covers both return types, explains the deterministic_hint, and mentions integration points. The output schema exists, so return values are documented elsewhere, but the description adds necessary context for agent decision-making.

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?

Schema coverage is 0%, so the description must add meaning for all 5 parameters, and it does. It explains docx_path as absolute path, course_subject_id as source for KG targets, book_id with default 'CC7S', batch as output prefix defaulting to filename stem, and mode with three options and their contexts. This far exceeds the bare 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 converts a lecture docx into Tiptap content, KG knowledge points, and image list. It specifies deterministic, zero-login, zero-storage behavior. The multiple modes (assist, auto, cuicui) are explained with their intended use cases, making the purpose unambiguous.

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?

The description explicitly states when to use each mode: default assist for understanding-based mapping, auto only when H3 headings match KG knowledge points (cleaned source). It also provides alternatives for image handling (use upload_image and save_lecture_frag) and clarifies that the tool itself does not upload images. This gives clear guidance on when to use this tool versus others.

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