No description
|
|
||
|---|---|---|
| .github/workflows | ||
| assets | ||
| extensions | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
pi-agent-curl-tool
Pi package that adds a curl_fetch tool. It downloads a URL, strips
boilerplate (scripts, styles, comments, nav, footer, head metadata), and
converts the HTML into compact Markdown so the agent uses fewer tokens.
No configuration. Sensible defaults are baked in:
- 30s timeout
- 2 MB max download
- 12 000 character Markdown cap (override per-call with
maxMarkdownChars) - Follows up to 5 redirects
Install
Install from npm once published:
pi install npm:pi-agent-curl-tool
Install directly from Git:
pi install git:https://git.otmatas.com/otmatas/PI-Curl.git
Or test without installing permanently:
pi -e git:https://git.otmatas.com/otmatas/PI-Curl.git
Local development install from this folder:
npm install
npm run typecheck
npm test
npm pack --dry-run
pi install ./
Tool
curl_fetchurlabsolute http(s) URL to fetch.maxMarkdownCharsoptional, default 12000.
The tool returns:
- HTML pages → Markdown with the page title, description, canonical URL,
and the body content. Scripts, styles,
<head>, navigation, footers, iframes, comments and SVGs are stripped before conversion. - JSON / plaintext / XML → the raw response body.
Output is truncated to maxMarkdownChars to keep the context small. The tool can fetch any absolute http or https URL, including local/internal URLs.
Example prompts
Llegeix https://example.com i resumeix-me la pàgina en tres frases.
Fetch https://api.github.com/repos/anthropics/claude-code and tell me the
star count.