Repository navigation
Ask the user for an unknown app's URL instead of sending the model to a web search - #212
Merged
Merged
Conversation
… a web search The error open_app returns for an app name outside the built-in registry told the model to "do a WEB SEARCH for the app's official front-end URL", and the two guessed-URL refusals said the same. That had the connector directing the model to another tool on its own. All three now tell it to ask the user for the app's official URL; the guessed-URL errors still offer open_app with the name first. The marketplace policy gate already banned "web search" in descriptions and schemas but never saw error text. A new test runs the same gate over these messages so the advice can't come back. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP2vTEWurjsdjKbqYXz4EC
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change to request unknown apps’ official URLs from users.
No open issues 🎉
What changed in this PR
This PR changes app URL guidance so the connector asks the user for an unknown app’s official URL instead of directing the model to web search. Known-app lookup and warnings against guessed domains remain intact.
Changes:
- Updates unknown-app and guessed-URL error messages to ask the user for the official URL.
- Adds policy regression coverage for URL guidance and updates existing assertions.
- Aligns README and directory-submission documentation with the new guidance.
| File | Description |
|---|---|
| README.md | Updates documented guidance for unknown app names. |
| docs/openai-directory-submission.md | Updates the expected guidance for refused URLs. |
| crates/imcp2-core/src/tools.rs | Revises URL error guidance and adds policy regression coverage. |
| crates/imcp2-core/src/discover.rs | Revises the unknown-app note, its documentation, and test assertions. |
Review effort: Balanced
aterga
marked this pull request as ready for review
October 28, 2026 08:46
sea-snake
approved these changes
Oct 28, 2026
aterga
pushed a commit
that referenced
this pull request
Oct 28, 2026
The Anthropic MCP Directory team's review email (received 2026-10-28) blocks the listing on one critical issue: the financial guard matches method names only, so update calls named transfer, withdraw and swap passed it and reached the target canister. They ask for value-moving capability to be detected from the canister's own interface (treat a declared canister exposing ICRC-1, ICRC-2 or ICP-ledger interfaces as a ledger and refuse its updates), for common non-standard value methods to be refused, for the server instructions to stop describing the guard as incomplete, and for a reply describing what the guard covers. Everything else passed, and the optional unknown-app suggestion was already addressed by #212. The submission log records all of that and the 2026-09-28 entry no longer claims there was no feedback. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ui6YJGczXE8vZv2pjyxX2F
Closed
5 of 9 tasks
aterga
pushed a commit
that referenced
this pull request
Oct 28, 2026
#213 landed on main as one squash commit (434b41a), and GitHub retargeted this stacked PR to main, where the branch's copy of #213's history conflicted with the squash. This merge resolves that by taking, for every file, exactly the tree of main plus the two keyword commits (the keyword scope, and the sourced exemptions): main's own changes since the branch point (#212) are kept, and nothing of #213 is carried twice. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP2vTGhAZfkTv1hwmKERA3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
open_appgets an app name outside the built-in registry, its error told the model to "do a WEB SEARCH for the app's official front-end URL". The two guessed-URL refusals said the same. That had the connector directing the model to another tool on its own. All three messages now tell the model to ask the user for the app's official URL instead. The guessed-URL errors still suggestopen_appwith the app's name first, since well-known apps resolve offline.The marketplace policy gate already banned "web search" in tool descriptions and schemas, but it never checked error text. A new test runs the same gate over these messages so the advice can't come back.
Related issues
None.
Changes
discover.rs: the unknown-app note fromfind_app_by_name(whichopen_appreturns for an unknown name) now says "ask the user for the app's official front-end URL, then call open_app with that URL". The "don't fabricate a domain" warning is unchanged.tools.rs:app_url_error_with_guidanceandunverified_app_url_errordrop the web-search step and keep "call open_app with the name", then "ask the user for the app's official URL".tools.rstests: newapp_url_guidance_respects_marketplace_policyrunspolicy_violationover the unknown-app note, both refusal variants (lookalike and plain), and the fetch-error guidance.README.mdanddocs/openai-directory-submission.md: the lines quoting the old advice now say "ask the user for the real URL".README.md:408, about looking up a token's canister ID, is a different path and is unchanged.Testing
cargo build --locked --all-targets(not run on its own; covered by the test and clippy builds)cargo test --locked --all-targets(root package: 71 + 8 + 10 passed), pluscargo test --locked -p imcp2-core --lib(188 passed, including the new test)cargo fmt --all -- --checkpasses.cargo clippy --all-targetsreports 6map_or/ redundant-closure warnings, all already onmainand none in lines this PR touches.npm test --prefix monitoring/mcp-status(dashboard unchanged)Checklist
Generated by Claude Code