Skip to main content
Glama

resolve_kg

Find knowledge graph nodes in a textbook by fuzzy name search, exact section number match, or browsing child nodes. Filter to leaf nodes for anchoring knowledge points.

Instructions

KG 锚定查表(确定性只读,数学+科学一套通吃):按名称/节号/父节点在某教材根下查节点,供选锚定叶子。

🔴 叶子=无子节点(is_leaf),别按 level 判——科学 901 树 5 层、902-906 树 4 层,叶深不一(H2 实测)。 用法:先 query 模糊(如「乘方」)看候选 → 挑 is_leaf=true 的最贴切者作 ingest_items 的 kp_id; 同步练习类卷名带节号可 section_num 精确命中(如 "2.5" → 「2.5 有理数的乘方」节点)。 参数: subject_root: 教材根 id(数学七上="100";科学="901".."906")——锚定范围的唯一开关 query : 名称模糊词(LIKE %query%) section_num : 节号精确匹配(如 "2.5",命中名称以「2.5 」开头的节点) parent_id : 只列某节点的直接子节点(浏览下钻用;给了它则忽略 subject_root 前缀过滤) leaves_only : 只返回叶子 返回: {ok, count, nodes:[{id,name,level,parent_id,is_leaf}]};无命中 → count=0 不报错。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
parent_idNo
leaves_onlyNo
section_numNo
subject_rootYes

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 provided, the description carries the full behavioral disclosure. It explicitly states the tool is '确定性只读' (deterministic read-only). It explains the leaf detection nuance (use is_leaf not level) and return format. It does not mention rate limits or auth requirements, but for a read-only tool, the transparency is good.

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 detailed but well-structured with sections and bullet points. It is not overly verbose; each part adds value. However, it could be slightly more concise, e.g., by reducing the redundancy of the leaf depth explanation. Overall, it balances detail with readability.

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 (6 params, one required) and no formal output schema, the description covers all necessary aspects: purpose, parameter usage, behavioral notes, return format, and edge cases (no matches return count=0 without error). It also provides a workflow context for downstream tools (ingest_items). This is comprehensive.

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?

Despite 0% schema description coverage, the description adds substantial meaning to all 6 parameters. It provides example values for subject_root (e.g., '100' for Math Grade 7), explains the effect of parent_id overriding subject_root, and clarifies the use of leaves_only. This goes well beyond the schema's basic types and defaults.

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: 'KG 锚定查表(确定性只读,数学+科学一套通吃)' indicating it is a read-only lookup in a knowledge graph for math and science. It specifies the actions: query by name, section number, or parent node under a textbook root. While it does not explicitly differentiate from sibling 'list_kg_tree', the description implies this tool is for targeted anchored lookup, not tree exploration.

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 a clear workflow: first use query fuzzy to find candidates, then pick a leaf node (is_leaf=true) as kp_id for ingest_items. It also covers exact match by section_num for exercise papers. However, it lacks explicit 'when not to use' or comparison to alternatives like list_kg_tree, slightly reducing the score from 5.

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