Skip to main content
Glama
sbguangha

agent-gateway

by sbguangha

kb_get_doc

Retrieve the full text of a specific document by its ID. Use the doc_id from a search result and paginate with the offset to read content longer than 4000 characters.

Instructions

【文档正文】按 doc_id 读取单篇正文(分页)。

【参数从哪来】doc_id 必须来自 kb_search.items[i].doc_id,禁止用标题猜。 【分段】默认最多 4000 字;truncated=true 时把 next_offset 原样传入继续读。 【飞书空洞】feishu_stub_only=true 时 readable=false,body 只有导语,不得当成全文。 【何时用】已经拿到 doc_id,用户要看原文/摘要/引用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
offsetNo
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

无注释,描述承担全部责任。它披露了分页行为(默认4000字、truncated时传入next_offset继续读),以及飞书空洞场景(readable=false、body仅导语)等行为细节,比单纯说“读取文档”更透明。但未提及权限或错误处理,留有一定空间。

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

描述用中文短句和【标签】分块,信息密度高,每句都有实际价值。没有冗余内容,结构清晰,易于快速阅读。

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?

有输出模式,但描述补充了关键行为(分页、空洞),以及使用前提(doc_id来源)。对于中等复杂度工具,描述已覆盖主要场景,但未提及错误处理或特殊返回值,略有不足。

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

Parameters4/5

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

schema描述覆盖率为0%,描述必须补偿。它解释了doc_id的来源(必须来自搜索,禁止猜)、max_chars默认值及行为,并通过“分页”和“next_offset”暗示offset用法。虽然未全面覆盖所有参数,但关键语义已补充。

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?

描述开头即明确核心功能:“按 doc_id 读取单篇正文(分页)”,动词“读取”+资源“正文”+分页行为清晰,与兄弟姐妹(搜索、大纲、节选)有明显区别。后续补充解释使目的更加明确,没有歧义。

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?

【何时用】部分明确指出“已经拿到 doc_id,用户要看原文/摘要/引用”,并强调 doc_id 必须来自搜索,不得用标题猜,这提供了明确的使用条件和参数来源。虽然未列出替代工具的排除条件,但已足够指导何时使用。

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