Skip to main content
Glama

律师教你怎么做 · 法律实务

search_law_text

按「条文内容」检索法规库:返回哪部法、第几条提到了这个词,并附命中片段。法规库近四万部、八十余万条条文。★用户问的是具体问题(「竞业限制最多几年」「彩礼什么情况下能要回」「高空抛物谁担责」)而不是法律名称时,用本工具;只有问「这是哪部法规定的」才用 search_law。★检索词取 3 个汉字以上(「竞业限制」而不是「限制」),两字词只能返回不完整结果。★本工具只给片段,正式引用前必须再用 get_law_article 取整条核对。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "q": "<q>"
    },
    "name": "search_law_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYes检索词,取用户原话里的核心法律概念,3 个汉字以上(如「竞业限制」「彩礼返还」「高空抛物」)。不要填整句话。
limitNo返回条数,默认 8,最多 20。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/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 and does well: it discloses corpus scale (近四万部法规、八十余万条条文), that results are snippets only rather than full articles, and that two-character queries yield incomplete results. It stops short of stating ranking, pagination, or rate-limit behavior, which keeps it below 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 the core purpose and return shape, then ★-marked rules that are easy to scan. Slightly redundant: the 3-character query rule appears in both the description and the q schema description, and the corpus-size sentence is informational rather than actionable.

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?

No output schema exists, so the description must explain returns — and it does, specifying law name, article number, and snippet. Combined with corpus size, query-length limits, and the required verification path via get_law_article, an agent has everything needed to call this correctly.

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 q and limit are already documented in the schema, which sets the baseline at 3. The description does add real value by warning that two-character terms return incomplete results, but it largely restates the schema's 'don't use a full sentence' guidance rather than introducing new semantics.

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 gives a specific verb and resource ('按「条文内容」检索法规库') and states exactly what comes back: which law, which article, plus a hit snippet. It also draws a hard line against sibling search_law (law-name queries) so an agent can route without opening either schema.

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?

Explicit routing rule: use this tool when the user poses a concrete legal question ('竞业限制最多几年', '彩礼什么情况下能要回'), and only use search_law when asking which statute governs. It also prescribes a mandatory follow-up step (get_law_article) before formal citation and a query-length heuristic (3+ Chinese characters), covering when and how to invoke.

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