Skip to Content

Tool reference

Every instrument the agent can reach for, with exactly what each one needs. Required inputs are enforced before anything costs a judgement call or execution — a missing field fails free with the fix spelled out.

Reference: dr-nib/backend/src/tools/executor.js, dr-nib/backend/src/agent/loop.js (REQUIRED_INPUTS), dr-nib/backend/src/spend/.

Research tools (free or metered, policy-approved)

ToolInputCostReturns as evidence
web_searchquery (full question or keywords)meteredranked results
web_fetchurls (array of https URLs)meteredextracted documents; paywalls/bot-checks reported, never worked around
search_sourcesquerymeteredevidence-graded sources
http_requesturl + optional method/headers/body$0status + headers + body; HTTP 4xx/5xx (except 402) count as failures, staying retryable
run_codecommand (one shell line) or code+languagemeteredstdout in an isolated ephemeral VM — RPC reads, dataset crunching, parsing. Keys never enter the sandbox

Observations are formatted before anything reads them: short hex values gain decimal annotations (0x4a817c800 (20000000000)), KB-sized blobs collapse to placeholders, and injection patterns are quarantined as data-never-instructions with the banner kept in the audit trail.

Spend tools (JEV-judged, always)

ToolInputCeilingSettles
tip_creatorcontentUrl + amount (USD) + optional recipient + title$1hub tip rail: challenge → transfer → verify, receipt + tx hash. Unresolved creators fall back to the domain holding box (claimable later). API-endpoint URLs are rejected — tip creator pages, not the APIs that listed them.
unlock_contenturl of the gated page$2same x402 pay, shaped as evidence (body joins the scorable set)
pay_x402url + body (the endpoint’s POST input)$2any x402-gated API. Price is read off the 402 challenge — never pass an amount; no readable price means refusing to sign blind

On spend tasks the loop funnels once free evidence is banked: first a nudge naming the spend tool, then turns restricted to spend-or-finish so research converges instead of polishing forever.

Direct transfers route through the spending mandate when configured, with no silent EOA fallback. Gateway x402 flows stay EOA-bound (contracts can’t sign authorizations) under the caps above.

What the agent sells (for external agents)

Dr. Nib meters its own retrieval to any agent with USDC — payment is the authentication, zero accounts:

EndpointPriceDoes
POST /v1/x402/search$0.01metered search over the free bench
POST /v1/x402/read$0.01fetch + extract one page (PDFs and Office docs included)

Both return a standard x402 challenge (402 + payment-required); Circle Gateway settles and the content comes back. Unconfigured deployments answer 501.

Last updated on