Skip to main content
Glama

fagai-policy-kb

get_excerpt

按文号或标题取政策正文节选(前若干字),用于确认文件内容和核心条款。

什么时候用:已经通过 search_policy 定位到候选文件,需要确认「是不是
这一份」、看正文开头和发文背景时用这个。要逐条引用、核对全部章节,
请改用授权端点的 get_article 取完整全文。

Args:
    doc_no: 文号,如「国令第712号」「川办发〔2026〕42号」。
            支持模糊匹配,只要包含即可。
    title: 文件标题关键词,如「政府投资条例」。doc_no 为空时才用。
    max_chars: 正文最多返回多少字。默认 1200,允许 300~2000。

Returns:
    标题、文号、发文机关、日期、层级、地域、来源链接,加正文前 max_chars 字。

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

Input Schema

NameRequiredDescriptionDefault
titleNo
doc_noNo
max_charsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

No annotations, so the description carries the burden and does well: it discloses that only the first max_chars characters are returned (truncation behavior), the 300–2000 bounds, and that get_article is the authorized endpoint. It omits explicit read-only/auth/rate-limit statements, but the read nature is implied by 取.

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, then a usage block, then Args/Returns — well organized and easy to scan. The Returns section partially restates the output schema, which is slight redundancy, but overall little waste.

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 3-parameter read tool with an output schema, the description covers purpose, when-to-use, alternatives, parameter semantics, and truncation behavior. Nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and does: doc_no gets fuzzy-match semantics with concrete examples, title is documented as a fallback only when doc_no is empty, and max_chars gets a default and range. This adds real meaning beyond the bare 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?

Uses a specific verb and resource (取政策正文节选) and states the scope (前若干字) explicitly. It distinguishes itself from search_policy (locating candidates) and get_article (full text), so an agent can tell exactly which tool to pick.

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?

Provides an explicit 什么时候用 section: use after search_policy has located candidates to confirm '是不是这一份', and explicitly routes to get_article for full-text citation. Parameter precedence (title only when doc_no is empty) is also stated.

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