Skip to main content
Glama

moonlight_pages

Idempotent

Extract text from a reader tab page by page, using local PDF text first and browser text as fallback for up to 10 pages while reporting extraction method and missing content.

Instructions

优先从页面提供的原始 PDF 在本机按页提取文字;来源不支持时回退到浏览器文本层。一次最多 10 页,报告提取方式和缺失状态。公式和图片需对照 PDF。

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": {
      "tabId": "<tabId>",
      "startPage": "<startPage>",
      "endPage": "<endPage>"
    },
    "name": "moonlight_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdYesmoonlight_tabs 返回的 tabId
endPageYes
startPageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, it discloses that the tool reports which extraction method was used and which pages are missing, warns that formulas and images must be cross-checked against the PDF, and caps a single call at 10 pages. These are real behavioral traits not encoded in the schema or annotations, though nothing is said about failure modes when neither source is available.

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?

Three compact clauses, front-loaded with the primary extraction strategy before fallback, limit, and caveats. Every sentence carries information; only the formulas/images note is slightly tangential to the invocation decision.

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?

With no output schema, the description does the work of describing what comes back (extraction method, missing status). For a 3-parameter read tool this is largely sufficient, with the minor gap that startPage/endPage semantics are left implicit.

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 coverage is only 33% (only tabId is described), but the description compensates by stating the 10-page ceiling, which effectively constrains startPage/endPage, and by clarifying that missing pages are reported. startPage/endPage remain undefined in prose, which keeps it below 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete action and resource: extract text page-by-page locally from the original PDF, falling back to the browser text layer. This tells an agent exactly what the tool produces, though the name 'pages' alone would not, and no sibling is explicitly named for contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It gives a clear extraction preference (local PDF first, browser text layer as fallback) and a hard limit of 10 pages per call, which is genuine usage context. However, it offers no guidance on when to pick this over siblings like moonlight_paper or moonlight_read_ai.

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