Skip to content

feat: declare tool effects, argument sensitivity and egress hosts on every plugin tool - #78

Merged
Resinder merged 1 commit into
mainfrom
feat/declare-tool-effects
Oct 18, 2026
Merged

Resinder merged 1 commit into
mainfrom
feat/declare-tool-effects

Conversation

@Resinder

Copy link
Copy Markdown
Contributor

Summary

Every AI_TOOLS entry in the catalog now declares the tool effect fields from minderhq/plugin-sdk#50: effect, idempotent, hosts and argument sensitivity. A host can then run reads straight away and ask the user before running anything that changes data. I chose each declaration by reading the action that backs the tool, not its name.

Plugin Tool Effect Idempotent Hosts Sensitivity
arxiv search_papers read yes export.arxiv.org query: free_text
crypto get_crypto_price read yes query1.finance.yahoo.com
frankfurter convert read yes api.frankfurter.dev amount: amount
github get_repo_stats read yes api.github.com
hackernews top_stories read yes hacker-news.firebaseio.com
network network_scan read yes (not set, see below)
network network_reconcile destructive no (not set, see below)
news get_news read yes (not set, see below)
openlibrary search_books read yes openlibrary.org query: free_text
portfolio get_portfolio_value read yes [] (platform store only)
tefas_funds get_fund_price read yes www.tefas.gov.tr (via tefas-crawler)
weather get_weather read yes geocoding-api.open-meteo.com, api.open-meteo.com location: free_text
wikipedia wiki_summary read yes *.wikipedia.org topic: free_text

telegraf and webcrawl have no AI_TOOLS.

Why network_reconcile is destructive

It runs a full cycle:

  • rewrites and reloads the telegraf managed region;
  • upserts the PostgreSQL inventory and the Neo4j topology;
  • publishes change events to RabbitMQ;
  • deletes inventory rows that have been down longer than the retention window, and prunes graph nodes that haven't been seen in that window.

The deletions put it in the most consequential class. It isn't idempotent, because change events and pruning depend on the previous cycle and on the clock.

Read tools that also write in the background

The crypto, frankfurter, github, news, tefas_funds and weather plugins write time series, but only from collect_data / refresh, which are not AI tools. Their tools only fetch. network_scan probes the configured targets (nmap, SNMP gets) and keeps the result in memory. It writes to no store, so it's declared read.

Tools without hosts

I didn't guess hosts for tools that connect to operator-configured hosts. In none of these cases is the URL a tool argument, so there is no url argument to mark:

  • news / get_news fetches the NEWS_FEEDS URLs from the plugin config. The plugin-level EGRESS = "public" covers them.
  • network_scan / network_reconcile reach the configured LAN targets (NETWORK_SCAN_TARGETS) and the backend URLs passed in the plugin config. The plugin-level EGRESS = "lan" covers them.
  • weather declares the default Open-Meteo hosts. An operator can repoint them with the WEATHER_API_BASE / WEATHER_GEOCODE_BASE environment variables. A comment next to the declaration says so.

Sensitivity

Arguments that carry model-written natural-language text to a third party are marked free_text: search queries, the topic, the location. These are the arguments a model could use to leak context. Constrained identifiers are left unmarked: the owner/repo (matched against a regex), coin symbol, fund code and currency codes. frankfurter's amount is marked amount. No tool has a recipient or URL argument.

Other changes

  • pyproject.toml: the dev SDK pin moves from 0861d974 to the plugin-sdk#50 merge commit f44873fcada50f17cc38d26089837d4d1a6227ec. The new commit descends from the old one. No release tag includes ci: run push CI on GitHub-hosted, not self-hosted #50 yet.
  • tests/test_tool_effects.py: minder-plugin validate only warns about a missing or contradicted effect. This test makes both a CI failure, checks that every read is idempotent, and pins the one non-read tool.
  • CONTRIBUTING.md: one sentence telling contributors to declare the fields.
  • catalog.json doesn't change, because its tool definitions don't include the effect fields and the SDK strips sensitivity. gen_catalog.py --check passes.

Validation

Run locally on the new SDK pin:

  • minder-plugin validate <plugin>/__init__.py for all 14 plugins: all OK, with no warnings. Before this change, 13 tools had missing-effect warnings.
  • pytest -q: 628 passed. That includes 28 new tests.
  • black --check .: clean. flake8 --max-line-length=100 --extend-ignore=E203,W503 .: clean. mypy .: no issues in 18 source files.
  • python scripts/gen_catalog.py --check: up to date. python scripts/check_plugin_policy.py: OK.

Closes #77

Agent-Session: zuhal-dev1

🤖 Generated with Claude Code

Every AI_TOOLS entry now declares what it does (plugin-sdk#50):

- every tool except network_reconcile is a pure read: effect "read",
  idempotent, and `hosts` set to the hosts fixed in code;
- network_reconcile is "destructive" and not idempotent. It rewrites and
  reloads the telegraf managed region, upserts the inventory and graph,
  publishes change events, and deletes stale inventory rows and graph
  nodes;
- news get_news and network_scan leave out `hosts`, because they reach
  operator-configured hosts. portfolio's read-back declares `hosts: []`
  because it only reads the platform store;
- model-written search text (arxiv/openlibrary query, wikipedia topic,
  weather location) is marked free_text, and frankfurter's amount is
  marked amount.

Bump the dev SDK pin to the plugin-sdk#50 merge commit so CI validates the
new fields. Add tests/test_tool_effects.py, which fails on a missing or
contradicted effect (validate only warns about these) and pins the
non-read tools.

Closes #77

Agent-Session: zuhal-dev1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Resinder

Copy link
Copy Markdown
Contributor Author

Driven by session zuhal-dev1 from 2026-10-18T21:00:31Z: it is the one session acting on this PR (pushes, reruns, merge). Protocol: minderhq/minder#2342.

Recorded by gh_ops.py merge before merging.

@Resinder
Resinder merged commit 42c5146 into main Oct 18, 2026
9 checks passed
@Resinder
Resinder deleted the feat/declare-tool-effects branch October 18, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: declare tool effects, argument sensitivity and egress hosts on every plugin tool

1 participant