Skip to main content
Glama

Engine Heart

legal.law_search

常用法律条文全文检索(本地 SQLite FTS5,共收录6部法律1796条):《民法典》1260条、《劳动法》107条、《劳动合同法》98条、《消费者权益保护法》63条、《道路交通安全法》124条、《治安管理处罚法(2025修订,2026年施行)》144条。三种用法:① keyword 关键词全文检索(如『经济补偿』『三倍工资』『醉酒驾驶』,可加 law 限定法律);② law + article_no 按法律名与条号直取条文(如 law=劳动合同法, article_no=47;条号可传阿拉伯数字或中文);③ 不传参数返回收录法律目录。返回法律名、条号与条文原文。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "legal.law_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
lawNo限定法律(简称即可):民法典/劳动法/劳动合同法/消费者权益保护法/道路交通安全法/治安管理处罚法
limitNo返回条数上限,1-50,默认10
keywordNo检索关键词,如 经济补偿、带薪年休假、消费者、醉驾
article_noNo条号,如 47 或 第四十七条(与 law 同时使用)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does well: it names the storage engine, discloses the exact corpus boundaries (so the agent knows results cannot exist outside these 6 laws), and states the returned fields (law name, article number, article text). It does not address empty-result behavior or whether article text is truncated, which is the remaining gap.

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?

Front-loaded with purpose and corpus, then modes, then return shape — a logical order with no filler. The per-law article counts are verbose but arguably earn their place by telling the agent what coverage to expect.

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 four-optional-parameter read tool with no annotations and no output schema, the description covers corpus scope, all invocation modes, and return fields — enough to call it correctly. Only result-edge behavior (no matches, result truncation, ranking) is left unstated.

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 description coverage is 100%, so all four parameters are already documented, establishing a baseline of 3. The description reinforces this with concrete value examples (『经济补偿』『三倍工资』) and adds the one behavior the schema cannot express — that omitting all parameters returns the law catalog — but adds no new semantics on limit or article-number normalization.

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?

States a specific verb+resource (full-text search of legal articles) and immediately scopes it: local SQLite FTS5, 6 laws, 1796 articles with per-law counts. The three usage modes make the operation shape unmistakable, so an agent knows exactly what this tool retrieves versus a calculator-style sibling like legal.labor_calc.

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?

Explicitly enumerates three invocation patterns with examples (keyword search, law+article_no lookup, no-param catalog) and shows how to combine law with keyword or article_no. It lacks any when-not guidance or explicit pointer to alternative tools, which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources