Skip to main content
Glama

按 slug 读文档

gwl_get_document
Read-only

Read a document's full content by slug with visibility-based field masking; each successful read increments its view count, so use the ID-based variant when reading for edits.

Instructions

按 slug 读取文档全文(返回字段随可见性做权限位掩码)。 ⚠️ 有副作用:每次命中都会 view_count + 1,因此标记为非幂等。 只是要读内容做编辑时,请改用 gwl_get_document_by_id(不加浏览数)。 不存在 404;无权查看 403。

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": {
      "slug": "<slug>"
    },
    "name": "gwl_get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYes文档 slug(路径参数,会自动做 URL 编码)。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that each hit increments view_count, that returned fields are permission-masked according to visibility, and that the failure modes are 404 (not found) and 403 (forbidden). The side-effect disclosure reconciles with idempotentHint=false and is exactly the kind of mutating-under-a-read-label behavior an agent would otherwise miss; note that readOnlyHint=true is the arguable odd one out, since the description is the more accurate of the two.

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?

Dense and front-loaded: the read purpose leads, the side-effect warning follows, then the sibling escape hatch, then error codes. It earns nearly every clause, though the meta-aside about being 'marked non-idempotent' is annotation commentary rather than actionable guidance.

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 one-parameter read tool with an output schema already defining return fields, the description covers the remaining unknowns an agent needs: what the side effect is, why the near-duplicate sibling exists, and how errors surface. Little is left to inference.

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?

With a single parameter and 100% schema description coverage, the schema already documents slug, its length bounds, and the automatic URL encoding. The description adds only the notion that the full document is returned, providing no meaning beyond the structured field.

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+key ('按 slug 读取文档全文') and immediately defines the scope that differentiates it from the nearest sibling: it bumps view_count, whereas gwl_get_document_by_id does not. An agent can choose between the two 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?

Gives an explicit routing rule with a named alternative and the selecting condition: '只是要读内容做编辑时,请改用 gwl_get_document_by_id(不加浏览数)'. That is an unambiguous when-to-use / when-not-to-use pair rather than implied context.

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