mcp-law-server
Provides vector similarity search for law titles, clauses, and audit items, enabling semantic retrieval.
Provides relational query for hierarchical and categorical law data, supporting structured lookups and filtering.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-law-serverfind regulations related to government procurement audit"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-law-server
审计法规智能检索 MCP Server —— 面向审计 Agent 的法规/条款/审计事项检索与核实服务。
Milvus 向量检索(法规名 / 条款 / 审计事项)+ MySQL 关系查询(层级 / 分类)+ Hermes Agent 编排 + Agent 核实
技术栈
层 | 选型 |
语言 / 运行时 | Python 3.12 |
包管理 / 构建 | uv + hatchling(src-layout) |
MCP 框架 | FastMCP >=2.3(stdio + HTTP 双传输) |
MySQL 访问 | SQLAlchemy 2.x async + asyncmy(双库:audit_corpus / auditkm_factory) |
向量库 | Milvus(pymilvus),库 |
Embedding | BGE-large-zh-v1.5,1024 维(本地 FlagEmbedding 推理) |
LLM | Qwen3.5-27B(vLLM,OpenAI-compatible HTTP) |
缓存 | Redis / 内存双后端(TTL + 多轮对话上下文) |
配置 | pydantic-settings + |
编排 | Hermes Python 编排引擎( |
Related MCP server: hivelaw
目录结构
mcp_law_server/
├── pyproject.toml # 元数据 / 依赖 / 入口 / 工具配置
├── .env.example # 环境变量模板(复制为 .env 填写)
├── Dockerfile # Docker 镜像构建(python:3.12-slim)
├── docker-compose.yaml # 单服务编排(stdio/http 双传输)
├── src/mcp_law_server/ # ── 应用代码(src-layout)──
│ ├── main.py # CLI 入口(stdio / http 双传输 + 优雅关闭)
│ ├── config/ # 配置层 —— Settings 单例(pydantic-settings)
│ ├── models/ # 数据模型层 —— enums / schemas / errors / error_codes
│ ├── interfaces/ # 接口层 —— 13 个 Protocol 定义(embedding/db/vector/cache)
│ ├── db/ # MySQL 数据访问层 —— connection + 5 个 DAO
│ ├── vector/ # Milvus 向量访问层 —— client + 3 个 Searcher
│ ├── embedding/ # Embedding 层 —— BGEEncoder 本地推理
│ ├── cache/ # 缓存层 —— 内存/Redis 双后端 + TypedCache
│ ├── tools/ # MCP 工具层 —— 11 个 tool handler(核心业务)
│ ├── hermes/ # Hermes 编排层 —— 10 文件 Python 包(14 Agent DAG)
│ ├── observability/ # 可观测性 —— logging + degradation + log_format
│ ├── registry/ # MCP Registry —— 12 文件 7 模块(工具注册/语义匹配/网关)
│ ├── chat/ # Chat 服务 —— export/law/stats/sse 4 模块
│ └── server/ # MCP Server 注册 —— mcp_app + error_boundary
├── scripts/ # ── 运维脚本(验证/演示/向量化/性能测试)──
└── tests/ # ── 测试(14 子目录,1066 测)──依赖方向(从下到上,禁止反向引用):
config → models → {db, vector, embedding, cache} → tools → server → main
横切层 observability/、registry/、interfaces/ 被多层依赖。
核心能力(11 个 MCP 工具)
类型 | 工具 | 说明 |
编排入口 |
| Hermes DAG 综合查询(意图→路由→三通道并行→融合) |
编排入口 |
| Agent 00 问题拆解 + 逐题验证 + 可信度聚合 |
路由入口 |
| 按意图路由到对应原子工具 |
原子工具 |
| 法规名称向量检索(MySQL 三形态 + Milvus 语义) |
原子工具 |
| 条款内容向量检索(Milvus 6 collection 联合) |
原子工具 |
| 审计问题→法规映射(bge 双路 RRF 合并) |
原子工具 |
| 按法规 ID 查六要素详情 |
原子工具 |
| 法规全文条款检索 |
原子工具 |
| 法规层级关系查询(上位法/相关法/历史版本/废止) |
原子工具 |
| 条款法定属性分类(7 类法律规范属性) |
原子工具 |
| 法规引用 4 轮 Loop 核实 |
快速开始
# 1. 安装核心 + 开发依赖(uv 会自动准备 Python 3.12 解释器)
uv sync
# 2. (按需)安装 ML 依赖(FlagEmbedding / torch,体积较大)
uv sync --extra ml
# 3. 配置环境变量
cp .env.example .env # 然后编辑 .env 填写真实值
# 4. 启动 MCP Server(stdio 模式)
uv run mcp-law-server
# 5. 启动 MCP Server(HTTP 模式)
MCP_TRANSPORT=http uv run mcp-law-server常用命令
命令 | 说明 |
| 安装核心 + 开发依赖 |
| 额外安装 ML 依赖 |
| 启动 MCP server(stdio) |
| 启动 MCP server(HTTP) |
| 运行全部测试(1066 测) |
| 代码风格检查 |
| 类型检查 |
| Docker 部署 |
环境变量
见 .env.example,字段与 src/mcp_law_server/config/settings.py 一一对应。
Available Tools
11 toolsagent_queryC
Hermes 编排综合查询(意图→路由→多通道→融合,返回最终回复与结构化依据)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| session_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description outlines the processing flow (intent→routing→multi-channel→fusion) and output structure (reply + structured basis). However, with no annotations, it lacks details on side effects, auth needs, or read-only guarantees, leaving moderate transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that efficiently conveys the orchestration pipeline. While it could benefit from clearer structure (bullets), it is free of redundancy and front-loaded with key information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and numerous siblings, the description lacks usage context, parameter details, and behavioral constraints. The existence of an output schema partially covers return values, but other completeness aspects are deficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the tool description offers no explanation of the 'query' or 'session_id' parameters—no format, constraints, or examples. This fails to add meaning beyond parameter names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs a comprehensive orchestrated query with intent routing, multi-channel fusion, returning a final reply and structured basis. This distinguishes it from simpler siblings like smart_query, though it could be more explicit about its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus siblings like decompose_query or smart_query. The description implies it's for complex queries needing orchestration, but no direct when-not or alternative references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
decompose_queryA
问题拆解与逐题验证编排器:将复杂审计问题拆为子问题,逐题调用 Hermes 编排获取答案并核实,汇总输出含可信度评估
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It transparently describes the multi-step process: decomposition, Hermes orchestration, answer verification, and confidence assessment. However, it does not disclose potential side effects or resource usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently communicates the tool's purpose, process, and output without unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's one-parameter schema and existence of an output schema, the description adequately covers the core functionality. It mentions the output includes confidence, but lacks details on error handling or prerequisite conditions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It indicates the input is a complex audit question, but does not explicitly describe the 'query' parameter beyond that context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool decomposes complex audit questions into sub-questions, orchestrates with Hermes, and outputs a summary with confidence. This distinct purpose separates it from siblings like smart_query or agent_query which handle simpler queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for complex audit questions requiring decomposition, but does not specify when not to use it or provide explicit alternatives among sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_clause_classificationsC
查询条款法定属性分类(7 类 clause_type)
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | ||
| law_id | No | ||
| keyword | No | ||
| clause_types | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits. It only states the tool queries classifications but does not mention that it is read-only, how it handles empty parameters, or what side effects (if any) exist. The behavior is minimally implied.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, providing the core purpose without unnecessary words. However, it could be slightly expanded to add value while remaining concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters and an output schema, the description is incomplete. It does not explain parameter usage, output format, or provide enough context for an agent to invoke the tool correctly. The output schema exists but is not referenced.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description does not explain any of the 4 parameters (top_k, law_id, keyword, clause_types). The mention of '7 clause types' hints at the clause_types parameter but does not clarify its use or the role of other parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries clause classifications and mentions 7 clause types, providing a specific verb+resource combination. However, it does not distinguish the tool from siblings like search_clause_vector or law_article_search, which may have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description lacks context about typical use cases, prerequisites, or scenarios where this tool is preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_regulation_hierarchyB
查询法规层级关系(上位法 / 相关法 / 历史版本 / 废止)
| Name | Required | Description | Default |
|---|---|---|---|
| law_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden, but it only states the purpose without disclosing behavioral traits such as data freshness, authorization needs, or limitations. It does not describe what the returned data entails beyond hierarchy types.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently conveys the tool's purpose. However, it could include more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has one required param, no schema descriptions, no annotations, but an output schema exists, the description is incomplete. It does not explain the parameter format or how the hierarchy is returned, making it insufficient for correct agent invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain the 'law_id' parameter beyond its name. No format, constraints, or examples are given, leaving the agent uncertain about how to supply valid input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (查询/query), the resource (法规层级关系/hierarchical relationship of laws), and specifies the types of relationships (上位法/相关法/历史版本/废止). This distinguishes it from sibling tools like law_lookup or law_article_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for querying hierarchy but does not explicitly state when to use it versus alternatives, nor provides conditions for use or exclusion. It lacks guidance on prerequisites or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
issue_to_lawC
审计问题 → 法规映射(bge 双路向量检索 + audit_issues 富表)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| basis_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description mentions retrieval method but does not disclose read-only nature, permissions, or side effects. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is concise but lacks structure. It sacrifices clarity for brevity, missing details that could be in a few more sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description provides no overview of return format. With 3 parameters and 11 sibling tools, completeness is inadequate for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage and description adds no parameter explanation. 'query', 'top_k', and 'basis_type' are not defined, leaving agent uninformed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool maps audit issues to regulations using dual-path vector retrieval and a rich table. It implies a specific function distinct from sibling law search tools, though the exact output format is not described.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings like law_article_search or search_clause_vector. The description lacks context for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
law_article_searchC
按条款号在法规正文中检索(MySQL LIKE 降级方案)
| Name | Required | Description | Default |
|---|---|---|---|
| law_id | Yes | ||
| article_number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. The description mentions a 'MySQL LIKE downgrade solution,' hinting at potential performance limitations but does not disclose side effects, authentication needs, or other behavioral traits. The agent has minimal transparency into how the tool operates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. It front-loads the core action. However, it sacrifices completeness for brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no parameter descriptions, and existing output schema, the description is insufficient. It fails to clarify expected return values, edge cases, or how the tool handles input variations. The tool has two required parameters and a technical nuance, but the description does not equip the agent well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description does not explain the meaning, format, or constraints of 'law_id' and 'article_number'. The agent must infer from parameter names alone, which is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (search by article number in legal text) and the resource (legal text). It distinguishes from general law name search by specifying article number and law ID, but does not explicitly differentiate from siblings like 'law_lookup' or 'search_clause_vector'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description lacks context about prerequisites, exclusions, or any comparison to sibling tools such as 'law_lookup' or 'search_clause_vector'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
law_lookupB
按法规 ID 获取法规六要素
| Name | Required | Description | Default |
|---|---|---|---|
| law_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description does not disclose any behavioral traits such as side effects, authentication needs, or rate limits. It merely states the action without additional context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise single sentence with no redundant information. Well-suited for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only one parameter and an output schema, the description is adequate but lacks clarity on the six elements concept. Output schema may compensate, but the description remains minimal.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the tool description does not elaborate on the 'law_id' parameter format or constraints. Fails to compensate for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (获取) and resource (法规六要素) with a specific identifier (法规ID). This distinguishes it from sibling tools that perform searches or decompositions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like search functions. The description lacks context for appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_clause_vectorC
按条款内容做语义检索,返回候选条款(含相似度)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| law_id | No | ||
| region_type | No | ||
| article_number | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only states it performs semantic search and returns similarity. It does not disclose read-only nature, potential side effects, authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, very concise, but lacks necessary detail for parameters and usage, making it insufficiently structured for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description omits parameter explanations and usage context for optional filters. The tool has moderate complexity (5 params, 1 required) but the description does not provide enough information to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning parameters have no descriptions. The tool description does not explain any of the five parameters (query, top_k, law_id, region_type, article_number), leaving agents to infer meaning from names alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'semantic search' and the resource 'clause content', and indicates the return of candidate clauses with similarity. It distinguishes from siblings like law_article_search (likely keyword) and search_law_name_vector (name search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. It only states what the tool does.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_law_name_vectorB
按法规名称检索(MySQL 精确优先 + Milvus 向量兜底)
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | ||
| law_name | Yes | ||
| region_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description reveals the core behavioral trait: the two-stage search strategy (exact then vector). This adds valuable insight beyond the input schema, though it omits details like error handling or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, front-loading the purpose in a single sentence. However, the brevity sacrifices parameter documentation, which could be added without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters (one required) and an output schema, the description does not explain the role of 'top_k' (ranking or limit) or 'region_type' (jurisdiction filter), nor how the output relates to the search strategy. This is insufficient for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate by explaining parameters, but it only implicitly references law_name. The 'top_k' and 'region_type' parameters are entirely undocumented in the description, leaving their semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action (search by regulation name) and uniquely specifies the search strategy (MySQL exact match first, Milvus vector fallback). This differentiates it from sibling tools like law_lookup which likely use different methods.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as when exact matching is insufficient or when vector search is preferred. The description does not mention prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
smart_queryC
智能综合查询(按意图路由到对应检索通道)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| law_name | No | ||
| intent_type | No | ||
| article_number | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only mentions routing by intent, but nothing about side effects, permissions, rate limits, or whether the tool is read-only. This is insufficient for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise, but it could be expanded to provide more value without becoming verbose. It is minimally acceptable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters with no descriptions and no annotations, the description is inadequate. It does not explain the output format (despite having an output schema), how the intent routing works, or special cases. The tool's complexity is not addressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no information about the parameters. The parameter names (query, law_name, intent_type, article_number) are self-explanatory to a degree, but the description does not clarify their usage, default behavior, or relationships.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it is an intelligent comprehensive query that routes to a retrieval channel based on intent, giving a general sense of purpose. However, it lacks specificity about what kind of retrieval or output, and does not differentiate from siblings like law_article_search or agent_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Sibling tools exist for specific searches (e.g., law_article_search, search_clause_vector), but the description provides no context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_law_referenceC
多轮 Loop 核实 Agent 输出的法规引用是否真实存在
| Name | Required | Description | Default |
|---|---|---|---|
| question | No | ||
| references | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description bears full burden. Mentions 'multi-round Loop', hinting at iterative behavior, but lacks details on side effects, error handling, or whether it modifies state. More behavioral info needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is concise but omits necessary detail about parameters and behavior. Structure is minimal; as a tool description it is under-specified despite brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description fails to explain the multi-round loop mechanism, input requirements, or expected output format. Incomplete for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and description does not explain the purpose or format of the parameters 'question' and 'references'. Leaves agent without understanding how to structure input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states the tool verifies whether legal references output by an agent actually exist, using a multi-round loop. This clearly identifies the verb and resource, and distinguishes it from search tools like law_article_search or law_lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like law_lookup or smart_query. Only states its function, leaving the agent to infer appropriate usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools have distinct purposes, but agent_query, decompose_query, and smart_query all serve query functions and could cause confusion about when to use each.
Names mostly follow verb_noun or noun_verb patterns with snake_case, but issue_to_law and smart_query deviate from the pattern, introducing minor inconsistency.
11 tools is well-scoped for a legal regulation server, covering queries, searches, hierarchy, and verification without being excessive.
The tool set covers core operations: semantic and keyword search, hierarchy retrieval, clause classification, issue mapping, and reference verification. No obvious gaps for a read-only legal server.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI governance MCP server for EU AI Act compliance and jurisdiction verification
City hiring-compliance MCP server with regulation search and full audit risk scoring.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Evidence-readiness MCP server: validate, audit, and score briefs, memos, and evidence packs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceRAG-enabled MCP server that uses Google Gemini for embeddings and Supabase for vector storage, enabling semantic search and document similarity matching through natural language queries.
- AlicenseNot gradedqualityCmaintenanceMCP server for AI compliance auditing. Scores agent outputs for hallucination liability under the EU AI Act, issues verifiable compliance stamps, and tracks audit history by agent.MIT
- FlicenseAqualityBmaintenanceAn MCP server that provides queryable access to Anti-Money Laundering (AML) red flag knowledge from regulatory documents. It enables compliance officers to ask natural-language questions and receive relevant, sourced red flags from a local vector database.7
- FlicenseNot gradedqualityDmaintenanceA production-grade MCP server that automates financial compliance audits by combining LLMs with structured analysis, enabling policy validation, risk profiling, and automated reporting.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/oranger07/mcp_law_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server