Skip to main content
Glama
jgrants-util-mcp-server

jgrants-util-mcp-server

by gotoai

read_attachment

Read-only

Reads a subsidy attachment PDF's text in character-limited chunks and resumes from a given offset, enabling extraction of application guidelines while flagging image-only pages.

Instructions

Read an attachment's text (PDF, page by page) in pieces of max_chars; continue from next_offset. pages_without_text lists PDF pages that are images only. Other formats cannot be read here.

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": {
      "subsidy_id": "<subsidy_id>",
      "kind": "<kind>"
    },
    "name": "read_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesAttachment kind, from get_subsidy_detail.
indexNoAttachment index within its kind.
offsetNoCharacter offset to read from.
max_charsNo
subsidy_idYesThe subsidy's id.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds real behavioral detail beyond that: chunked reads with a continuation offset, and the fact that image-only PDF pages are surfaced via pages_without_text rather than silently dropped.

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 short clauses, front-loaded with the core action and with zero filler. The only friction is the 'next_offset' wording that does not match the schema's 'offset' parameter name.

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?

An output schema exists, so return values need not be enumerated, and the description still flags the one non-obvious return field (pages_without_text). For a read-only paginated reader with 5 parameters, this is close to complete; only the sibling routing is missing.

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 80%, so the baseline is 3, but the description goes further by explaining the offset/max_chars continuation contract and the meaning of pages_without_text. Minor weakness: it calls the continuation point 'next_offset' while the actual parameter is 'offset', which could momentarily confuse an agent.

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?

States a specific verb and resource ('Read an attachment's text') plus the format scope (PDF, page by page) and the chunking mechanism. It does not name the sibling load_guideline, so the agent must infer the boundary from 'Other formats cannot be read here' rather than an explicit routing statement.

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?

The description implies the pagination workflow ('continue from next_offset') and excludes non-PDF formats, which is useful usage context. However, it never says when to prefer this over load_guideline or get_subsidy_detail, so the alternative-selection guidance is only implied.

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