Skip to main content
Glama

search_questions

Retrieve questions from the question bank using filters like subject, type, difficulty, and keyword. Supports public and personal question pools with paginated output.

Instructions

从题库分页检索题目(备课圈题核心)→ POST /teacher/question/page。返回 {ok, total, items}。

🔴 快速找回路径(PRD-O-005 溯源增强):给 batch_id 或 since 任一 → 改走 backends/db 只读检索 (按 import_batch_id / create_time / create_user 查,不依赖 stem LIKE,故不漏 stem_text=NULL 的变式题),可与 mine/subject_id/question_type/difficult 组合。返回 items 附 import_source/batch_id/create_time。

  • batch_id: 精确批次号(ingest_items/ingest_question 返回的 batch_id,如 mcp-20260708-...)

  • since : 时间窗,'24h'/'7d' 或 ISO 日期('2026-07-08');mine=True 限本人。

🔴 subject_id 语义 = 前缀子树匹配:传章节/课时的 biz_subject 节点 id → 召回该节点下 整棵子树所有知识点的题(likeRight 前缀);传叶子 id → 只该叶子的题。非数字 id → BE 静默返空集。 🔴 私有 vs 公共两套口径:

  • 默认(mine=False)= 公共池(status='1' AND is_public=1,仅超管审核过的题);

  • mine=True = 本人已发布题(create_user=登录老师,status='1',含 is_public=0 私有题、 含举一反三变式/据讲义自造题)。🔴 圈自己造的题必须 mine=True。

  • 🔴 两种口径都只返 status='1'(已发布)——草稿 status='0' 永不进列表。 参数: subject_id : 知识点/章节/课次的 biz_subject id(resolve_kg / get_plan_detail.kgNodeIds 来);空=不过滤 question_type: 题型码 1选择/2判断/3应用/4填空/5解答/6作图/7计算/8证明;None=不限 difficult : 难度 1-4 星(按段分层规则挑档);None=不限 keyword : 题干 LIKE %kw% mine : True=只看本人已发布题(含私有池);False=公共池 exam_paper_id: 按出处卷 id 筛(字符串数字);None=不限 label_status : 打标态 0未标/1AI已标/2已审核;None=不限 pattern_id : 题型 id(biz_question_pattern)收窄;None=不限 page_index : 页码(🔴 从 1 起,非 0) page_size : 每页条数(默认 20) 返回: {ok, total, items:[{id(str 雪花), question_type, difficult, subject_id, stem_brief, stem_img, status, label_status, free_tags, patterns, ...}]}。id 直接透给 build_prep_pack。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mineNo
sinceNo
keywordNo
batch_idNo
difficultNo
page_sizeNo
page_indexNo
pattern_idNo
subject_idNo
label_statusNo
exam_paper_idNo
question_typeNo

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 full burden and excels: it discloses that only status='1' (published) questions are returned, drafts (status='0') never appear, non-numeric subject_id silently returns empty set, and the two different retrieval paths. It also explains the public vs private pool semantics and the subtree matching of subject_id. All behavioral traits are explicitly stated.

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 with headers (🔴 sections for fast path, subject_id, public vs private) and a bulleted parameter list. It is front-loaded with the main purpose and endpoint. While it contains some verbose internal references (PRD-O-005) and emoji clutter, every sentence adds value and the organization aids readability. It is concise for the amount of detail provided.

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 (12 parameters, no annotations, output schema present), the description is remarkably complete. It covers tool purpose, all parameter semantics, two retrieval modes, public/private pool differences, return value format, error behavior (silent empty set), and filtering conditions. The output schema is described inline. An agent can correctly invoke the tool with this information alone.

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 fully. It does: every parameter is explained with semantic meaning, including enumerations (e.g., question_type codes, difficult range 1-4, label_status values), usage context (e.g., page_index starts from 1, page_size default 20), and special behaviors (e.g., subject_id prefix subtree matching, batch_id/since for fast path). This is comprehensive.

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 purpose: paginated search of questions from the question bank, core for lesson preparation. It specifies the endpoint (POST /teacher/question/page) and return type ({ok, total, items}). It also distinguishes itself by describing two retrieval paths (fast recover with batch_id/since vs normal search), which differentiates it from siblings like get_question (single question retrieval) and my_recent_uploads (specialized recent uploads).

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 explicit guidance on when to use alternative modes: it explains the fast recover path when batch_id or since is provided, and distinguishes between public pool (mine=False) and own questions (mine=True) with the note that '圈自己造的题必须 mine=True' (for self-created questions must use mine=True). It also explains the subject_id subtree matching behavior. However, it does not explicitly compare with all sibling tools, but the context is sufficient for most cases.

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