Skip to content

Ask the user for an unknown app's URL instead of sending the model to a web search - #212

Merged
aterga merged 1 commit into
mainfrom
claude/unknown-app-error-search-1fd7cz
Oct 28, 2026
Merged

aterga merged 1 commit into
mainfrom
claude/unknown-app-error-search-1fd7cz

Conversation

@aterga

@aterga aterga commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

When open_app gets 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 suggest open_app with 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 from find_app_by_name (which open_app returns 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_guidance and unverified_app_url_error drop the web-search step and keep "call open_app with the name", then "ask the user for the app's official URL".
  • tools.rs tests: new app_url_guidance_respects_marketplace_policy runs policy_violation over the unknown-app note, both refusal variants (lookalike and plain), and the fetch-error guidance.
  • Updated the existing assertions that expected "web search" / "WEB SEARCH".
  • README.md and docs/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), plus cargo test --locked -p imcp2-core --lib (188 passed, including the new test)
  • cargo fmt --all -- --check passes. cargo clippy --all-targets reports 6 map_or / redundant-closure warnings, all already on main and none in lines this PR touches.
  • npm test --prefix monitoring/mcp-status (dashboard unchanged)

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change.
  • No secrets, credentials, or internal-only information are included.

Generated by Claude Code

… 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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
aterga marked this pull request as ready for review October 28, 2026 08:46
@aterga
aterga requested a review from a team October 28, 2026 08:46
@aterga
aterga merged commit 44a07d9 into main Oct 28, 2026
17 checks passed
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
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
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.

4 participants