Skip to main content
Glama

Law Search

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": "law_search"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/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 behavioral burden and does most of the work: it discloses the backing engine (local SQLite FTS5), the corpus boundary (only 6 laws, so results outside them do not exist), and the returned fields. It leaves secondary behavior unstated — result ordering/relevance ranking, what happens on zero hits, and whether limit applies to direct article lookup — which is why it is not a 5.

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 structured with numbered usage modes, so an agent can scan for its case quickly. The per-law article counts are borderline padding but do convey corpus coverage; a small amount of redundancy exists between the description and the schema on article_no formats.

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?

An output schema exists, yet the description still names the return shape (法律名、条号、条文原文), and it covers all three invocation patterns plus the corpus limit. Minor gaps remain around combination rules (e.g. keyword plus article_no) and empty-result behavior, but nothing that would block a correct call.

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, including the Arabic-vs-Chinese article number note that the description repeats. The description adds example keyword values (『经济补偿』『三倍工资』『醉酒驾驶』) and an example law pairing, but says nothing about limit, so it sits at the baseline for a fully documented 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?

States a specific verb (全文检索) and resource (法律条文), and immediately bounds the scope: a local SQLite FTS5 index covering 6 named laws and 1796 articles, with per-law counts. An agent knows exactly what corpus it is querying, which clearly separates it from the calculator siblings court_fee_calc and 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 Guidelines5/5

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

Enumerates three concrete invocation modes (① keyword search with optional law filter, ② law + article_no direct lookup, ③ no-params catalog listing) with worked examples for each. This is explicit when/how guidance rather than inference, and the no-param case is called out rather than left ambiguous.

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