Skip to main content
Glama

Core: Fetch web pages

metrecept_fetch_web_pages

Fetch public web pages through a compliance filter and return redacted markdown or JSON content for direct page retrieval, metered and receipted.

Instructions

Fetch public web pages through the Metrecept compliance filter and return redacted markdown or JSON context, metered and receipted. Use it when you need the page content itself. Not for a model answer grounded in pages: pass fetch_urls to metrecept_create_chat_completion. Not for an authenticated JSON API you hold a key for: use metrecept_call_api. Call metrecept_get_fetch_policy first to pick a valid purpose and stay within its character caps; a few URLs per call is the norm. Pass the same session_id you use on chat and API calls to group them into one metrecept_get_session_receipt receipt. Behaviour: the tenant must have accepted Terms/DPA at Checkout, otherwise the call is refused. robots.txt is respected (fail-closed), PII is redacted, and login walls, 401/403 and 402 pay-per-crawl refusals are honoured, never bypassed. Never cached. Failures return JSON {"error", "status"} with secrets redacted. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.

Input Schema

NameRequiredDescriptionDefault
urlsYesPublic http(s) page URLs to fetch; keep it to a handful (per-source and total character caps from metrecept_get_fetch_policy apply).
queryNoOptional plain-text question that focuses the summary; empty string for a general summary.
formatNo"markdown" (default) or "json" (title/text/meta/json_ld); anything else falls back to markdown.markdown
purposeNoCompliance purpose: public_web_retrieval (default), business_catalog, public_company_info or job_listings.public_web_retrieval
session_idNoOptional session tag grouping this call with others; read the signed aggregate later with metrecept_get_session_receipt.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.3.1
    • addedInput schema / properties / format / description
      Added value: +"\"markdown\" (default) or \"json\" (title/text/meta/json_ld); anything else falls back to markdown."
    • addedInput schema / properties / purpose / description
      Added value: +"Compliance purpose: public_web_retrieval (default), business_catalog, public_company_info or job_listings."
    • addedInput schema / properties / query / description
      Added value: +"Optional plain-text question that focuses the summary; empty string for a general summary."
    • addedInput schema / properties / session_id / description
      Added value: +"Optional session tag grouping this call with others; read the signed aggregate later with metrecept_get_session_receipt."
    • addedInput schema / properties / urls / description
      Added value: +"Public http(s) page URLs to fetch; keep it to a handful (per-source and total character caps from metrecept_get_fetch_policy apply)."
  2. Addedv0.1.4

TDQS

A4.7/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does so substantively: Terms/DPA acceptance required or the call is refused, robots.txt respected fail-closed, PII redacted, login walls and 401/403/402 honoured and never bypassed, never cached, failures return JSON with redacted secrets. It omits how concurrency, retry or per-call failure granularity behaves (partial successes across multiple URLs), which is the main residual gap for a multi-URL fetch.

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?

Front-loaded with the core action, then a clearly signalled 'Behaviour:' block. Dense but nearly every clause adds operative fact; the auth sentence at the end is somewhat boilerplate relative to the rest, which keeps it just short of 5.

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 5-parameter tool with an output schema and no annotations, the description covers what an agent needs before calling: auth mechanism, tenant scoping, compliance refusal conditions, prerequisite policy lookup, and failure shape. Return-value detail is correctly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description still adds cross-cutting meaning: it ties session_id to grouping chat/API calls into one receipt, ties purpose to the mandatory get_fetch_policy lookup and its character caps, and characterizes the expected urls volume. That is workflow semantics the schema cannot express.

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 and resource ('Fetch public web pages through the Metrecept compliance filter') plus the return shape (redacted markdown or JSON context, metered and receipted). It explicitly distinguishes itself from the two nearest siblings, metrecept_create_chat_completion (model answers grounded in pages) and metrecept_call_api (authenticated JSON APIs).

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 positive selection criteria ('use it when you need the page content itself'), two explicit when-not cases naming the correct alternative for each, and a prerequisite ('call metrecept_get_fetch_policy first to pick a valid purpose'). It also normalizes call shape ('a few URLs per call is the norm'), which prevents an agent from batching too aggressively.

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