web-remove

A command for removing a named web-source alias from a local sources file. It can also delete the cached Markdown files for that source.

In plain words
What is it for?
Use it as `/web-remove <source>` or `/web-remove <source> --keep-cache`. Built-in sources cannot be removed, but they can be replaced with a custom URL.
Why use it?
It removes sources you no longer need and helps prevent outdated cached content from being used. You can keep the cache if you only want to remove the alias.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/raintree-technology/docpull/web-remove
Clone the repo
git clone --depth 1 https://github.com/raintree-technology/docpull
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 460 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00460
Opus 5 $0.00009 $0.00230
Sonnet 5 $0.00003 $0.00092
Haiku 4.5 $0.00002 $0.00046

Measured yesterday against content hash 1c9eb5cdd700, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

web-remove scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Don't run `rm -rf` via Bash; the MCP tool's `delete_cache=true` does the safe path-validated deletion.
Origin

This is a copy

92% identical to docs-remove — 18 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugin/commands/web-remove.md · 43 lines

What it actually says

Remove a web source

The user wants to remove a previously-added source. By default this also deletes cached Markdown to free disk and avoid stale answers.

User input: $ARGUMENTS

How to handle the input

Parse $ARGUMENTS as:

  • First token = source alias (the alias to remove).
  • Optional --keep-cache flag = remove the alias from the user registry but leave the cached .md files on disk.

If empty: reply Usage: /web-remove <source> [--keep-cache]. Run /web-list to see what's cached. and stop.

Workflow

  1. Default (no flag): remove alias AND delete cache. Call remove_source(name=<source>, delete_cache=true). The MCP tool refuses to remove builtins (react, nextjs, etc.) - pass that error through to the user with the suggestion in step 3.

  2. --keep-cache flag: remove alias only. Call remove_source(name=<source>, delete_cache=false). The cached Markdown stays; /web-search <source> will keep working until the user runs this without the flag.

  3. If the tool returns "is a builtin source": Tell the user that builtins can't be removed but they can be shadowed with a custom URL via /web-add (or by editing sources.yaml directly).

  4. If the tool returns the no-op response (no user source AND no cache to delete): tell the user there was nothing to remove. Don't error.

Output

One line: confirm what was removed (alias only, cache only, both, or nothing). The MCP tool's response is already specific - relay it.

Don't

  • Don't run rm -rf via Bash; the MCP tool's delete_cache=true does the safe path-validated deletion.
  • Don't call this on builtins thinking force will help - there's no force flag for removal by design.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 43 lines · 17 tokens per session scan C 1c9eb5cdd700

Subscribe to this mod's changes

web-remove is a command published in the GitHub repository raintree-technology/docpull (25 stars, last pushed 5d ago), licensed MIT. It adds 17 tokens to every session and 460 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). It is 92% identical to docs-remove, differing in 18 lines, and is treated as a copy.