Token-efficient web reading and HTTP requests for MCP agents — fetch clean text from any URL or call REST APIs
Two well-defined tools with complete input schemas, clear descriptions, and proper error handling. fetch_text and http_request both have detailed parameter documentation and structured output. Naming is verb-forward and action-clear. Main gaps: no output schema documentation in code, no tool annotations (readOnlyHint/destructiveHint), and parameter descriptions could be more prescriptive about constraints (e.g., URL format validation, timeout bounds). Error messages are actionable but could guide recovery more explicitly.
Fetches a URL and returns clean readable text — no HTML tags, scripts, or navigation noise. Ideal for reading articles, documentation, and web pages without context bloat. Extracts <title> separately. Truncates to max_chars (default 20 000) when needed. Non-HTML responses (JSON, plain text) are returned as-is up to max_chars.
Universal HTTP client. Performs GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS requests. Use body_json for JSON APIs (auto-serializes + sets Content-Type: application/json). Use body for raw payloads (XML, form-data, plain text). Works with remote URLs, localhost, and internal network addresses. Returns status, headers, body, and elapsed time.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) declared. http_request with WRITE risk should be marked destructiveHint=true; fetch_text should be marked readOnlyHint=true. This prevents agents from accidentally misusing write tools.
Output schemas not documented in code. While responses are structured (ok, status, body, etc.), there is no formal JSON Schema definition visible for return types. LLMs cannot plan downstream tool calls without knowing response field names and types.
Parameter constraints not fully specified in descriptions. url parameter lacks format hint (must be valid URL); timeout_ms and max_bytes lack min/max bounds; max_chars description does not state the hard limit is 20000. Descriptions should include 'must be 1 - 500000' style constraints.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | <=2025-11-25 | v2 |
Error recovery guidance is minimal. Timeout errors return 'Timeout after Xms' but do not suggest retry strategy or backoff. Network errors return err.message but do not categorize as retryable vs fatal. Errors should follow pattern:recovery-guide.
http_request accepts arbitrary headers and body without sanitization. No validation against header injection, request smuggling, or command injection via body. Tool should validate header names and sanitize untrusted input.