Skip to main content
Glama

Fetch a URL under Rein spend policy

rein_fetch

Fetch URLs and handle x402 paywalls: check payment against policy before money moves. Approved payments settle; denied requests stop; over-limit spends escalate for human approval.

Instructions

HTTP fetch with x402 payments governed by Rein. If the resource is behind a paywall, the payment is checked against policy BEFORE any money moves: allowed payments are settled and receipted, denied ones never happen, and payments past an envelope are escalated to a human for a signed approval. Use this instead of a plain fetch for any request that might be paid. Returns the response plus what Rein decided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute URL to fetch.
bodyNoRequest body, already serialized.
methodNoHTTP method. Default GET.
taskIdNoAttributes this spend to a unit of work, so per-task budgets can cap it. Use one id for every payment of one job.
headersNoExtra request headers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and openWorldHint=true; the description adds the material behavior: policy is checked BEFORE money moves, allowed payments settle and are receipted, denied payments never happen, and over-envelope payments escalate to a human for signed approval. That is exactly the pre-execution side-effect detail an agent needs and cannot get from annotations.

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 sentences, front-loaded with purpose, then the policy/gating behavior, then the return summary. Dense but each sentence carries distinct information; no filler or repetition of the 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?

With no output schema, the description at least signals the return shape ('the response plus what Rein decided'), and it covers the escalation/approval path. It stops short of describing what the decision payload or escalation outcome looks like, but for a 5-param fetch wrapper whose schema is fully documented this is close to complete.

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

Parameters3/5

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

Schema description coverage is 100%, so url, body, method, taskId and headers are already documented in the schema (taskId even explains per-task budgeting). The description adds no parameter-level syntax or format detail beyond that, so the baseline 3 applies.

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 ('HTTP fetch with x402 payments governed by Rein') and immediately positions it against the generic alternative ('use this instead of a plain fetch'). An agent can distinguish it from the rein_* status/receipt/escalation siblings without opening a schema.

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?

Gives an explicit selection rule: use this instead of a plain fetch for any request that might be paid. It does not state when *not* to use it (e.g. unpaid/known-free requests) or how it relates to rein_receipts or rein_escalations for follow-up, but the core routing condition is clear.

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