Skip to main content
Glama
Dasistaiden

whed-tools

by Dasistaiden

extract_pdf_text

Download a PDF and extract its text content for reading course handbooks, academic calendars, or prospectuses found during crawling.

Instructions

Download a PDF and extract its text content using pdfplumber.
Useful for reading course handbooks, academic calendars, prospectuses,
and other PDF documents discovered during crawling.

Args:
    url: Direct URL to a PDF file
    max_size_mb: Skip PDFs larger than this (default 5 MB)
    max_chars: Cap extracted text length (default 30000 chars)

Returns:
    Dictionary with extracted text, page count, and character count.
    Returns success=False if the PDF is too large, image-based, or unreadable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
max_charsNo
max_size_mbNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that oversized PDFs are skipped, that text length is capped by default, and that failure (success=False) occurs for too-large, image-based, or unreadable files. It stops short of mentioning network/auth requirements, rate limits, or download behavior, leaving some gaps for a network-and-parse operation.

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?

The Args/Returns layout is front-loaded and easy to scan, with the core action stated first and supporting detail after. It is slightly padded by the trailing document-type list and a partially redundant Returns block given an output schema exists, but nothing is egregiously wasteful.

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?

For a three-parameter download-and-parse tool with an output schema, the description supplies the missing constraint semantics and the failure modes an agent needs. It is nearly complete, with only peripheral details like timeout or retry behavior left out.

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 description coverage is 0%, so the description must compensate, and it does: all three parameters are explained with intent and defaults (direct PDF URL, size-based skip threshold at 5 MB, character cap at 30000). The url wording only notes it must be a direct PDF link, so subtle edge cases (redirects, non-PDF content types) remain unaddressed.

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?

The description names a specific verb sequence (download and extract text) and a precise resource (PDF content via pdfplumber), which cleanly separates it from siblings like scrape_url or extract_data. It also enumerates concrete document types (handbooks, calendars, prospectuses) that sharpen the intended target.

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?

It gives clear usage context — PDFs discovered during crawling, and the kinds of documents it suits — which helps an agent pick it over generic scraping tools. However, it never names an alternative tool or states when not to use it, so the routing guidance is implied rather than explicit.

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