Skip to content

retrieve_tools can return bare tool ids that describe_tool/call_tool_* cannot use #871

Closed

Description

@neylwalecki

Summary

retrieve_tools can return a bare tool name, while describe_tool and call_tool_read/write/destructive require the <server>:<tool> format. That makes the documented progressive-disclosure flow break for index entries that have ToolMetadata.Name as the short tool name and ToolMetadata.ServerName set separately.

Why this matters

The tool descriptions for call_tool_* say to use the exact name returned by retrieve_tools. describe_tool also says its tool_ids must come from retrieve_tools in <server>:<tool> form.

When retrieve_tools returns create_issue instead of github:create_issue, the agent follows the instructions but the next step fails with an invalid/not-found tool id.

Related existing work

I found related but distinct prior work:

I did not find an existing issue specifically covering retrieve_tools returning bare ids that are not directly usable by describe_tool or call_tool_*.

Expected behavior

When ToolMetadata.ServerName is known, retrieve_tools should return the canonical <server>:<tool> identity in:

  • compact mode id
  • full mode name
  • disabled/locked entries where applicable

Notes

I have a small patch with tests that canonicalizes the response identity without changing the index storage format.

Activity

  1. Dumbris commented on Jul 21, 2026

    @Dumbris
    Member

    Thanks @neylwalecki — solid report, this checks out. Repro'd on latest main (0aa3de4) with a stock server-everything upstream: compact mode returns {"id":"echo",...} with no server field at all, and feeding that id back gives describe_tool → not_found (with a remediation telling you to use exactly what retrieve_tools returned 😅) and call_tool_read → "Invalid tool name format". everything:echo works fine, so it's purely the returned identity.

    One heads-up for your patch: if you canonicalize at the index read seam, watch the annotation/call_with lookup — buildFullToolEntry and the annotation-filter loop only strip the server: prefix when ServerName == "", so a newly-canonical name gets passed prefixed into lookupToolAnnotations (which matches against bare StateView names) → annotations silently drop and call_with regresses to the old #306 behavior. Those two sites need unconditional normalization.

    PR very welcome 🙏 We're also prepping a fix branch with tests on our side — happy to reconcile with yours.

  2. neylwalecki commented on Jul 21, 2026

    @neylwalecki
    ContributorAuthor

    Thanks @Dumbris — appreciate the quick confirmation and fix. We'll test from our side once this lands in a stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions