Skip to main content
Glama
liftkkkk

OWL MCP Server

by liftkkkk

🦉 OWL MCP Server

让 AI 直接读写你的 OWL / TTL / RDF 本体文件

License: MIT Python MCP owlready2

English · 快速开始 · 工具列表 · 示例


简介

OWL MCP Server 是一个基于 Model Context Protocol (MCP) 的本体操作服务器。

它让 Claude、Cursor、WorkBuddy 等 AI 助手能够像操作普通文件一样,直接查询、修改、推理你的 OWL/TTL/RDF 本体文件 —— 无需手写 SPARQL,无需了解 OWL 语法细节,用自然语言对话即可完成复杂的知识图谱操作。

你:"找出所有 XX 类的个体,按金额降序排列"
AI:[调用 sparql_query] → 返回结构化结果

适用场景

  • 🏦 金融领域:对账单、票据本体的增删改查

  • 🏥 医疗健康:临床知识图谱探索与推理

  • 🏗️ 工程建模:设备、流程本体的管理与验证

  • 🎓 学术研究:OWL 本体的快速原型开发与测试


Related MCP server: Ontology MCP

快速开始

第一步:安装依赖

pip install mcp owlready2 rdflib

或使用 requirements.txt:

pip install -r requirements.txt

⚠️ 推理器依赖 Java:使用 run_reasoner(Pellet/HermiT)需要本地安装 JDK 8+

第二步:配置 MCP 客户端

WorkBuddy

~/.workbuddy/mcp.json 中添加:

{
  "mcpServers": {
    "owl": {
      "command": "python",
      "args": ["/绝对路径/server.py"]
    }
  }
}

💡 推荐:使用虚拟环境的 Python 绝对路径,避免依赖冲突:

"command": "C:/Users/yourname/.workbuddy/binaries/python/envs/default/Scripts/python.exe"

Claude Desktop

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "owl-mcp": {
      "command": "python",
      "args": ["/绝对路径/server.py"]
    }
  }
}

Cursor

.cursor/mcp.json 中添加同样的配置,重启 Cursor 后即可在 Agent 模式中使用。

第三步:启用并开始对话

在 WorkBuddy 连接器管理页面找到 owl,点击 Trust 启用,然后直接开始自然语言对话:

"加载本体文件 C:/work/xxxx.ttl"
"列出所有类,只显示以 xxx: 开头的"
"描述 BankStatement 类的完整结构"
"运行 HermiT 推理器,检查本体一致性"
"把新增的类保存回原文件"

工具列表

📖 查询类

工具

说明

load_ontology

加载本体文件(支持本地路径或 IRI,格式:TTL / OWL / RDF)

get_ontology_info

获取本体概览(类数、个体数、属性数、命名空间)

list_classes

列出所有类,支持前缀过滤与数量限制

list_individuals

列出所有个体,支持按类过滤

list_properties

列出对象属性 / 数据属性

describe_class

详细描述类(父类、子类、限制、已知个体)

describe_individual

描述个体(所属类型、全部属性值)

search_entity

按关键词模糊搜索类 / 个体 / 属性

sparql_query

执行 SPARQL 1.1 SELECT 查询

✏️ 修改类

工具

说明

add_class

添加新类(可指定父类、rdfs:label、rdfs:comment)

add_individual

添加新个体(可指定初始属性值)

add_object_property_assertion

添加对象属性三元组断言

save_ontology

保存本体(支持 rdfxml / turtle / ntriples)

🧠 推理类

工具

说明

run_reasoner

运行推理器(Pellet 或 HermiT),检查一致性并推断隐含知识

注意add_* 系列修改操作不会自动保存,需显式调用 save_ontology


示例用法

探索本体结构

你:加载 xxx.ttl,给我一个整体介绍
AI:该本体共有 47 个类、213 个个体、18 个对象属性……

你:描述一下 BankStatement 类
AI:BankStatement 是 FinancialDocument 的子类,拥有以下数据属性:amount、currency、date……

SPARQL 查询

-- 查找所有 BankStatement 及其金额(降序)
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX : <http://test.com/t#>

SELECT ?ind ?amount WHERE {
  ?ind rdf:type :BankStatement .
  ?ind :amount ?amount .
}
ORDER BY DESC(?amount)

增量修改

你:新增一个 AA 类,父类是 BB,标签为"CC"
AI:[调用 add_class] → 已添加 AA 类

你:把这个改动保存为 turtle 格式
AI:[调用 save_ontology] → 已保存到 xxx.ttl

一致性检查

你:运行 HermiT 推理器,检查本体有没有逻辑矛盾
AI:[调用 run_reasoner] → 本体一致,推断出 3 个新的隐含类成员关系……

技术栈

组件

用途

owlready2

OWL 本体加载、修改、推理器调用

rdflib

SPARQL 1.1 查询引擎

mcp

Model Context Protocol SDK


注意事项

  • 推理器需要 Java:Pellet / HermiT 依赖 JDK 8+,请确保 java 在系统 PATH 中

  • 大型本体:超过 10 万三元组时,list_* 系列操作请配合 limit 参数使用

  • 修改不自动保存:所有 add_* 操作仅更新内存模型,需手动调用 save_ontology

  • SPARQL 语法:使用标准 SPARQL 1.1 语法,由 rdflib 引擎执行


兼容的 MCP 客户端

  • ✅ WorkBuddy

  • ✅ Trae/Traw-work

  • ✅ Claude

  • ✅ Cursor (Agent 模式)

  • ✅ 任何支持 MCP 标准的 AI 客户端


License

MIT


☕ 请作者喝杯咖啡

OWL MCP Server 是我在业余时间独立开发和维护的开源项目,永久免费。

如果它帮你省下了哪怕半小时手写 SPARQL 的时间,可以考虑请我喝杯咖啡(¥9.9 就够 ☕)—— 你的每一份支持都会直接转化为新功能开发和 bug 修复的动力。

不方便赞赏? 给项目点个 ⭐ Star、提一个 Issue、或把它分享给需要的人,同样是巨大的支持!


Available Tools

14 tools
add_classA

向本体添加一个新类,可指定父类、标签和注释。修改不会自动保存,需调用 save_ontology。

ParametersJSON Schema
NameRequiredDescriptionDefault
labelNo可选:rdfs:label 标签
commentNo可选:rdfs:comment 注释
class_nameYes新类的 local name
parent_classNo父类的 local name,默认为 owl:ThingThing

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden of disclosing behavior. It states that changes are not automatically saved, which is a key behavioral trait. However, it does not mention error handling, permissions, or side effects like duplicate class names.

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 extremely concise with two sentences: one for the function and one for the persistence caveat. Every word is necessary, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (4 parameters, no output schema), the description covers the essential functional information and the critical persistence behavior. It could mention uniqueness constraints or error scenarios, but not strictly needed.

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

Parameters3/5

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

The input schema has 100% description coverage, so the baseline is 3. The description only restates what the schema already says (parent, label, comment), adding no additional meaning or constraints.

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 action (add a new class) and resource (ontology class), and the mention of specifying parent, label, and comment distinguishes it from sibling tools like add_individual. The Chinese text is direct and unambiguous.

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 an explicit guideline about the need to call save_ontology after adding, which is crucial for usage. However, it does not compare with siblings or specify when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_individualA

向本体添加一个新个体,并指定所属类。修改不会自动保存,需调用 save_ontology。

ParametersJSON Schema
NameRequiredDescriptionDefault
class_nameYes所属类的 local name
propertiesNo可选:初始属性键值对,如 {"amount": 100.0, "currency": "CNY"}
individual_nameYes新个体的 local name

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It correctly indicates that this is a write operation and emphasizes that changes are not auto-saved, which is key for the agent to understand post-use steps.

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 concise with two sentences, each serving a distinct purpose: stating the function and providing a critical usage caveat. There is no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 parameters, nested object, no output schema), the description covers the essential behavioral context (save requirement). However, it could mention validation or error cases, but it is still fairly complete for a straightforward add operation.

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

Parameters3/5

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

The description does not add meaning beyond the input schema for the parameters. Since schema description coverage is 100%, a baseline score of 3 is appropriate. The schema already adequately describes individual_name, class_name, and properties.

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: adding a new individual to the ontology and specifying its class. This distinguishes it from sibling tools like add_class (which adds a class) and add_object_property_assertion (which adds a property assertion).

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 critical usage guidance: modifications are not automatically saved and require a call to save_ontology. This is a clear behavioral note but does not explicitly list when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_object_property_assertionA

为个体添加对象属性断言(subject --property--> object)。修改不会自动保存,需调用 save_ontology。

ParametersJSON Schema
NameRequiredDescriptionDefault
objectYes客体个体 local name
subjectYes主体个体 local name
propertyYes对象属性 local name

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description adds the behavioral disclosure that changes are not auto-saved. But it lacks information on idempotency, error handling, or whether duplicate assertions are allowed.

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?

Two short sentences with no wasted words. The purpose is stated first, followed by a critical behavioral note. Highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with 3 parameters and no output schema, the description covers the core purpose and the important save requirement. Minor gaps exist, such as return value and duplicate handling, but it is largely complete.

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

Parameters3/5

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

Schema coverage is 100% with clear parameter descriptions. The description does not add extra meaning beyond the schema, so baseline 3 applies.

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 action 'add object property assertion' and the resource 'individual', with a helpful diagram (subject --property--> object). It is distinct from sibling tools like add_class or add_individual.

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 crucial usage note: modifications are not saved automatically and require calling save_ontology. However, it does not explicitly state when to use this tool versus alternatives or exclude any scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_classA

描述一个类:父类、子类、等价类、限制条件、所有个体。

ParametersJSON Schema
NameRequiredDescriptionDefault
class_nameYes类的 local name(如 BankStatement)

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It enumerates exactly what information is returned (parent, subclass, equivalent class, restrictions, individuals), which is transparent. However, it does not explicitly state that the tool is read-only or what happens if the class does not exist.

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 a single sentence that conveys all necessary information without any extraneous words. It is front-loaded with the action and resource, followed by a list of what is returned. Every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description adequately covers the return value. It could mention prerequisites like the ontology being loaded, but given the complexity, it is nearly complete.

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?

The input schema has 100% coverage with a description for 'class_name'. The description adds value by specifying the format (local name like 'BankStatement'), which helps the agent provide the correct value. No additional parameters need explanation.

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 that the tool describes a class, listing its parent, subclass, equivalent class, restrictions, and all individuals. It uses a specific verb ('describe') and resource ('class'), distinguishing it from siblings like list_classes or describe_individual.

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 implies usage when detailed information about a class is needed, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., list_classes for names only, or describe_individual for individuals). No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_individualA

描述一个个体:所属类、属性值(数据属性和对象属性)。

ParametersJSON Schema
NameRequiredDescriptionDefault
individual_nameYes个体的 local name

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It transparently states the returned information (class and property values), but lacks details on format or whether it includes inferred properties. No side effects are implied.

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?

A single, well-structured sentence that front-loads the verb and resource. No wasted words, and it efficiently conveys the tool's purpose and scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, no output schema), the description adequately covers what the tool does and what it returns. It could elaborate on output format or whether inferred properties are included, but it's sufficient for most use cases.

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

Parameters3/5

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

Schema coverage is 100% with a clear parameter description ('个体的 local name'). The tool description adds value by stating output contents, but that pertains to overall behavior rather than parameter semantics. Baseline 3 is appropriate.

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 verb '描述' (describe) and resource '个体' (individual), listing what it describes: class, data properties, object properties. This distinguishes it from siblings like 'describe_class' and 'list_individuals'.

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 implies usage for retrieving detailed individual information but provides no explicit guidance on when to use this tool versus alternatives like 'list_individuals' or 'search_entity'. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_ontology_infoB

获取当前加载本体的基本信息:IRI、类数量、个体数量、属性数量等。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

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

No annotations provided. Description indicates read-only behavior by 'get', but lacks details on side effects, permissions, or performance. Minimal behavioral context.

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?

Single sentence conveying all necessary information without redundancy. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, so description should explain return structure. Lists returned items but not their format or types. Adequate but could be more precise for an AI agent.

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 has zero parameters, so coverage is trivial. Description adds value by enumerating returned information (IRI, counts) which is not present in schema.

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?

Clearly states the verb 'get' and resource 'ontology info', listing specifics like IRI, class count, individual count, property count. Distinguishable from siblings like 'add_class' or 'list_classes', though not explicitly differentiated.

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?

Implied usage for retrieving basic ontology stats before other operations, but no explicit when-to-use or when-not-to-use guidance, nor mention of alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_classesA

列出本体中所有类(OWL Class)。可选按名称前缀过滤。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo最多返回多少条,默认 100
prefixNo可选:按类名前缀过滤(大小写不敏感)

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It states the general functionality but omits details like return format, pagination behavior, or performance implications. The limit parameter is noted but not explained in terms of behavior beyond default.

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 two sentences with no wasted words. It efficiently conveys the core functionality and optional filtering.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (list with two optional params) and no output schema, the description is sufficient but lacks details about what is returned (e.g., names vs IRIs, count). It meets minimum viability.

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

Parameters3/5

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

Schema coverage is 100% as both parameters have descriptions. The description adds minimal new meaning beyond reinforcing that prefix filters by name. Baseline of 3 is appropriate.

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 lists all OWL classes in the ontology, using a specific verb and resource. It distinguishes from siblings like 'add_class' and 'describe_class' by focusing on listing.

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 mentions optional filtering by prefix but does not provide explicit when-to-use or when-not-to-use guidance. It lacks comparison to alternatives such as 'describe_class' for detailed information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_individualsA

列出本体中所有个体(OWL Individual)。可选按类名过滤。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo最多返回多少条,默认 100
class_nameNo可选:只列出该类的个体(类的 local name)

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description must stand alone. It accurately describes the basic behavior (listing and filtering), but does not disclose any potential limitations or side effects beyond the schema-defined parameters.

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?

Two concise sentences with no extraneous information. Efficiently communicates the core functionality.

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?

For a simple list tool with only two parameters and no output schema, the description is complete. It covers what the tool returns and the optional filter behavior.

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

Parameters3/5

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

Schema coverage is 100% and includes descriptions for both parameters. The description adds minimal additional meaning (simply restates the optional filter). Baseline score of 3 applies.

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 it lists OWL individuals with optional filtering by class name. It effectively distinguishes itself from sibling tools like list_classes and list_properties.

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 clear context for when to use the tool (to list individuals, optionally filtered), but does not explicitly state when not to use it or mention alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_propertiesB

列出本体中所有对象属性(ObjectProperty)和数据属性(DataProperty)。

ParametersJSON Schema
NameRequiredDescriptionDefault
prop_typeNo属性类型:object / data / all,默认 allall

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the basic function without disclosing behavioral traits such as whether it is a read-only operation, any permissions needed, or the format of returned data.

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 a single, concise sentence that efficiently conveys the tool's purpose without unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one parameter and no output schema, the description is adequate but lacks details on the return format or any behavioral context. It does not explain what the output looks like, which may be needed for effective use.

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

Parameters3/5

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

The input schema has 100% coverage with a well-defined enum and default. The description adds no additional meaning beyond the schema, so it meets the baseline expectation of not needing extra elaboration.

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 it lists all object and data properties in the ontology, using a specific verb and resource. It adequately distinguishes from sibling tools like add_class or describe_individual, which perform different operations.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention exclusions, prerequisites, or scenarios where other tools (e.g., search_entity) might be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

load_ontologyA

加载一个 OWL/TTL/RDF 本体文件(本地路径或 IRI)。后续所有操作都在这个本体上进行。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes本体文件的本地绝对路径(如 C:/work/my.ttl)或 IRI(如 http://...)

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose whether loading overwrites an existing ontology, validation requirements, error behavior, or side effects. Only states the action without behavioral details.

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?

Two sentences, no wasted words, front-loaded with the core purpose. All information contributes to understanding the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description does not explain return values or confirmation. It does not mention prerequisites like file validity or permissions. For a loading tool, more context on what the agent can expect after invocation is missing.

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

Parameters3/5

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

Schema coverage is 100% with the single parameter 'path' having a description. The description adds context about local absolute path or IRI, but does not provide additional semantic information beyond the schema's baseline.

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 states the verb 'load' and the resource 'ontology file' with specific formats (OWL/TTL/RDF) and types (local path or IRI). It clearly distinguishes from sibling tools by implying this is the initial setup operation.

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 implicitly guides usage by stating 'all subsequent operations are performed on this ontology', indicating it should be used first. However, it does not explicitly mention when not to use or provide alternatives, though the context makes it clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_reasonerA

运行推理器(Pellet 或 HermiT)对本体进行推理,检查一致性并推断隐含知识。需要本机安装 JDK 8+。

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonerNo推理器名称:pellet 或 hermit,默认 hermithermit

TDQS

A3.7/5.0
Behavior3/5

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

Lacks annotations; description covers running reasoner and inference but does not disclose whether it modifies the ontology or only returns results.

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?

Two sentences, efficient and front-loaded with purpose and prerequisite.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose and prerequisite but fails to describe output or how to access inference results; no output schema provided.

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

Parameters3/5

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

Schema coverage is 100% with enum and default; description merely repeats reasoner names and default, adding little beyond the 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?

Description clearly states the tool runs a reasoner (Pellet or HermiT) to check consistency and infer implicit knowledge, distinguishing it from siblings like add_class or sparql_query.

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?

Provides a prerequisite (JDK 8+) but no explicit guidance on when to use this tool versus alternatives like querying with sparql_query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

save_ontologyA

将当前本体(含所有未保存的修改)保存到文件。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo可选:另存为路径。不填则覆盖原文件。
formatNo序列化格式,默认 rdfxmlrdfxml

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It states that all unsaved modifications are saved, but it does not mention side effects (e.g., whether it overwrites without confirmation), error handling, or whether it blocks further editing. This is insufficient for an agent to predict behavior safely.

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 a single, efficient sentence that immediately conveys the tool's purpose. Every word earns its place; there is no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only two simple parameters and no output schema. However, the description lacks any mention of return value, success/failure indicators, or lock/blocking behavior. Given the simplicity, it is minimally adequate but could provide more details on outcomes.

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 description coverage is 100%, but the description adds critical semantics for the 'path' parameter: it clarifies that leaving it blank overwrites the original file. This additional context aids the agent's decision beyond what the schema provides.

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 specifies the action ('save') and the resource ('current ontology with unsaved modifications'). It directly indicates what the tool does, and the verb 'save' differentiates it from sibling tools like load_ontology.

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 provide when to use or when not to use this tool, nor does it mention alternatives. Usage is implied but not guided; the agent must infer context from the tool's name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_entityA

按名称关键词搜索类、个体、属性(大小写不敏感模糊匹配)。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo最多返回多少条,默认 30
keywordYes搜索关键词(大小写不敏感)

TDQS

A4/5.0
Behavior3/5

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

The description discloses case-insensitivity and fuzzy matching but no other behavioral traits (e.g., pagination, performance, result ordering). Since annotations are absent, the description carries the full burden, and it provides only basic transparency.

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 a single sentence that front-loads the action and resource, with no wasted words. It is optimally concise for a search tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and the existence of sibling tools, the description adequately covers the essential function. However, it lacks details about result types or cross-entity searching, which would improve completeness for more complex use cases.

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 100%, so the schema already documents both parameters. The description adds the fuzzy matching detail not in the schema, enhancing parameter semantics beyond the baseline of 3.

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: searching for classes, individuals, and properties by name keyword with case-insensitive fuzzy matching. It uses specific verbs and resources, distinguishing it from sibling tools that perform specific CRUD operations or complex queries.

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 implies use for keyword-based search across multiple entity types but does not explicitly state when to use this tool over alternatives like list_classes or sparql_query. No guidance on when not to use it is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sparql_queryA

对当前本体执行 SPARQL SELECT 查询,返回结果列表。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo最多返回多少条,默认 50
queryYes完整的 SPARQL 1.1 SELECT 查询语句

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It states it is a SELECT query and returns results, but does not explicitly indicate it is read-only (no mutation). It also omits potential behaviors like timeouts, pagination, or error handling. Basic but acceptable.

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 a single concise sentence (10 words) that conveys the essential functionality without any superfluous information. Well-structured and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two parameters, no output schema, and no annotations, the description provides the core function but lacks details on output format (e.g., list of variable bindings vs. rows) and potential limitations. Adequate but not thorough.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented. The description does not add any extra meaning beyond what the schema provides. Baseline score of 3 is appropriate.

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 executes a SPARQL SELECT query on the current ontology and returns a list of results. It effectively distinguishes itself from sibling tools which either mutate the ontology or describe specific entities.

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 implies usage for running arbitrary SPARQL SELECT queries, but lacks explicit guidance on when to use this tool over siblings, when not to use it, or prerequisites. No context on usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 14 tool updatesv0.1.0
    • First observedadd_class
    • First observedadd_individual
    • First observedadd_object_property_assertion
    • First observeddescribe_class
    • First observeddescribe_individual
    • First observedget_ontology_info
    • First observedlist_classes
    • First observedlist_individuals
    • First observedlist_properties
    • First observedload_ontology
    • First observedrun_reasoner
    • First observedsave_ontology
    • First observedsearch_entity
    • First observedsparql_query

TDQS

A3.8/5.0

Scored across 14 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: loading, saving, listing, describing, adding, searching, reasoning, and querying. No two tools overlap in functionality.

Naming Consistency4/5

Most tool names follow a <verb>_<noun> pattern (e.g., add_class, describe_individual). The exception is sparql_query, which uses noun_noun, but it's still consistent with the underscore convention and clearly understandable.

Tool Count5/5

14 tools is well-scoped for an ontology server, covering essential operations without being overwhelming or too sparse.

Completeness3/5

Missing delete and update operations for classes, individuals, and properties. Only object property assertions can be added, not data property assertions or property definitions. However, core loading, saving, listing, describing, reasoning, and querying are present.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers