Skip to main content
Glama

parse_paper_text

Structures exam paper text into question JSON using deterministic rules, extracting number, type, stem, options, answer, and source for ingestion into question management.

Instructions

规整卷面文本 → 题列表 JSON(确定性规则拆题,零 LLM)。适合 convert_doc 产物 / 规整粘贴文本。

拆题规则:题号「N、/N./N.」+ 章节头判题型 + 【来源】/【答案】/【解析】+ 多小问状态机 + 卷尾参考答案回填。 产出每题含 〖图:rId〗 占位(如有)。🔴 agent 拿到后须核对题数/补漏,再构造 IngestItem[] 喂 ingest_items; 位置序号(数组下标+1)= 入库 sort,别用 num(原卷题号遇杂散「N.」会错位——七上教训)。 参数: text 卷面文本(与 text_path 二选一,text 优先)。 返回: {ok, count, questions:[{num,type,stem,options,answer,analyze,has_fig,source,score}], digest}。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
text_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden. It details the rule-based splitting process, state machine for sub-questions, answer backfilling, and figure placeholder handling. It also warns about potential num misalignment. However, it does not explicitly state if the tool is read-only or modifies data.

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 somewhat lengthy but each sentence adds value. It is well-structured with purpose, rules, usage notes, parameter info, and return format. The front-loading of the main function is good, though some sentences could be merged for brevity.

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 existence of an output schema, the description still explains the return fields (ok, count, questions with subfields) comprehensively. It provides all necessary context for an agent to use the tool and process results correctly.

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

Parameters4/5

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

Schema coverage is 0%, so description must compensate. It explains that 'text' is the paper text, mutually exclusive with 'text_path', and that 'text' takes priority. It adds useful semantic info beyond the schema, though 'text_path' could be more clearly described.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool converts standardized exam paper text to a JSON list of questions using deterministic rules. It mentions suitability for convert_doc output, providing context, but does not explicitly differentiate from all sibling tools beyond that.

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 provides explicit when-to-use guidance (suitable for convert_doc output or pasted text), explains how to use the output (verify count, construct IngestItem[]), and warns against using 'num' for sorting. It also clarifies parameter selection (text preferred over text_path).

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