@gfgghgftgffg/pi-web-access-lean
A lighter wrapper for pi-web-access: one web_access tool, about 87% less tool text on the first call.
Package details
Install @gfgghgftgffg/pi-web-access-lean from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@gfgghgftgffg/pi-web-access-lean- Package
@gfgghgftgffg/pi-web-access-lean- Version
0.1.21- Published
- Nov 28, 2026
- Downloads
- 1,924/mo · 315/wk
- Author
- gfgghgftgffg
- License
- MIT
- Types
- extension
- Size
- 71.4 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@gfgghgftgffg/pi-web-access-lean
A single-tool, low-context facade for pi-web-access — cutting registered tool text by ~87%.
Consolidates web search, claim verification, URL/PDF fetching, and stored-result pagination behind one web_access tool while delegating all execution to the upstream pi-web-access engine.
Features
- Unified
web_accessentrypoint — Routessearch,check,fetch,get, andhelpthrough a single tool without registering duplicate upstream tool definitions. - On-demand parameter discovery — Rare flags and currently allowed search providers stay out of the permanent schema; inspect them via
op: "help"and pass extra fields as a JSON object string ininput. - Direct local PDF extraction — Local
.pdfpaths andfile:///URLs extract Markdown directly, returning the saved file path, Markdown content, character count, and page count (when provided by the engine). - Multimodal page Q&A — Remote image and video-frame questions run through upstream
answermode when paired with an image-capable model, returning a text answer while keeping original source content accessible viaget.
Installation
Install from npm without pinning a version:
pi install npm:@gfgghgftgffg/pi-web-access-lean
pi update --extensions
Or install from a local checkout of the monorepo:
node scripts/install-extension.mjs pi-web-access-lean
[!IMPORTANT] Keep only one
pi-web-accessextension or wrapper active at a time to avoid duplicate tool registrations. Local checkout installations are updated by pulling the repository and re-runninginstall-extension.mjs(pi updatedoes not modify local checkouts). When migrating to npm, back up your settings, remove the exact old entry shown inpi list, and then install the npm package.
Usage
Pass an explicit op alongside input (a search query, claim, URL, local PDF path, response ID, or JSON object string).
Search the web:
{ "op": "search", "input": "Pi coding agent extensions" }
Verify a factual claim:
{ "op": "check", "input": "The paper was published in 2024" }
Fetch a web page or read a local PDF:
{ "op": "fetch", "input": "https://example.com/page" }
Continue reading a stored response:
{ "op": "get", "input": "response-id" }
Inspect all parameters and allowed providers for an operation:
{ "op": "help", "input": "fetch" }
Pass advanced options as a JSON string inside input:
{ "op": "fetch", "input": "{\"url\":\"https://example.com/page\",\"redirects\":\"same-origin\"}" }
[!TIP] Upstream hints may mention
get_search_contentwhen output is paginated or stored. Route those follow-up reads throughweb_accessusingop: "get"and put the response ID (or a JSON object string with extra retrieval fields) ininput. Page bodies are returned unmodified.
Configuration and Boundaries
- Upstream configuration — Search providers, API keys, routing rules, and fetch settings are read from
~/.pi/agent/web-search.json(and upstream environment variables). See the pi-web-access configuration guide for supported services and billing rules. - External service privacy & cost — Queries and fetched pages may be transmitted to configured third-party search or extraction APIs and incur usage charges; review your
web-search.jsonbefore use. - Proxy enforcement — Upstream proxy settings (including
lockProxy) apply unchanged; omit per-callproxyto use your configured route. - Local vs. remote PDFs — Local PDF reads extract Markdown only and do not support upstream's structured
extractmode; remote PDFs follow upstream routing. - Always-direct registration —
web_accessregisters directly on startup; upstreamtoolExposure/toolActivationdeferral settings do not hide or defer this facade.
Context footprint (character proxy)
| Package | Registered character proxy |
|---|---|
| @gfgghgftgffg/pi-web-access-lean | 149 |
| pi-web-access | 1110 |
Fixed ceil(characters / 4), not provider billing tokens.
Source and Development
Adapted from kunkun9527/pi-web-access-lean over Nico Bailon's pi-web-access, maintained in amox-pi-extensions-lean. The upstream engine is installed as a dependency rather than copied; both projects are MIT-licensed (LICENSE preserved).
For repository checks and adaptation details, see the maintenance policy and MAINTENANCE.md.