Skip to main content
Glama

ingest_question

Insert a new question into the question bank with subject, type, difficulty, and stem text; handles duplication via external key or stem hash.

Instructions

录一道题入库(事务多表),归属当前登录 teacher。返回 {ok, question_id, created, import_source, batch_id}。

free_tags: 自由标签 → biz_free_tag 字典 + biz_question_free_tag 关联(三件套之一,检索锚)。

参数(NOT NULL=必填): subject_id : 科目锚 level1(年级根,如 数学七上 的根 id),NOT NULL question_type: 字典 biz_question_type 1选择/2判断/3应用/4填空/5解答/6作图/7计算/8证明,NOT NULL difficult : 1基础/2提升/3压轴,NOT NULL stem_text : 纯文本题干(全文检索 + 去重 hash),NOT NULL block_json : 来自 format_question 的 blockJson(三端渲染);空则只存 stem_text answer_text / analyze_text: 答案 / 解析文本 knowledge_ids: 锚知识点叶子 [{kpId, isPrimary, source, confidence}](KG 关联,供组卷/举一反三召回) images : 题图 [{ossUrl, assetId, role, ...}](来自 upload_image) external_key: 幂等键(book+节+课时+题号),去重;空则按 stem_text hash 去重 status : '0'草稿 / '1'发布(默认发布) import_source: 双管道来源标记;空则自动打 "mcp-<角色>"(MCP 机录,与手工/其他管道可区分) import_batch_id: 录入批次号;空则自动生成 mcp-YYYYMMDD-HHMMSS-4位随机 🔴 双管道语义:不带 "mcp-" 前缀的 import_source(main/手工导入/'举一反三'引擎…)= 其他/手工管道。 异常: 底座报错 → {ok:false, reason}(不假成功)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imagesNo
statusNo1
difficultYes
exam_yearNo
free_tagsNo
stem_textYes
block_jsonNo
source_rawNo
subject_idYes
answer_textNo
region_codeNo
source_typeNo
analyze_textNo
external_keyNo
import_sourceNo
knowledge_idsNo
question_typeYes
import_batch_idNo

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 fully discloses behavior: it returns a structured response with fields like ok, question_id, created, import_source, batch_id; explains the dual-pipeline semantics for import_source; and specifies error behavior ('底座报错 → {ok:false, reason}'). This covers safety and side effects adequately.

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 description is well-structured with bullet points and clear headings. It front-loads the return type and uses a concise table-like format for parameters. Every sentence earns its place without redundancy.

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 complexity (18 parameters, 4 required, no annotations, output schema present), the description is complete. It explains the output return structure, all parameters thoroughly, and interactions with other tools (e.g., upload_image, format_question). No gaps are left.

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 description coverage is 0%, so the description must compensate, and it does. It explains each parameter's meaning, constraints, defaults, and relationships (e.g., free_tags linked to biz_free_tag, knowledge_ids linked to list_kg_tree). This adds significant value beyond 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's action: '录一道题入库(事务多表)' (ingest a question into database with multi-table transaction) and associates it with the current teacher. It distinguishes from siblings like search_questions and delete_questions by specifying it is a creation operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. While it is implied for adding a single question, there is no guidance on prerequisites or when not to use it. Sibling tools like 'ingest_items' potentially serve a similar batch purpose, but no comparison is made.

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