inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Although server doesn't support completions, inspector sends them

Open odrobnik opened this issue 7 months ago • 0 comments

My custom MCP Server doesn't state that it supports completions in the initialize response. Still the inspector - if you type in a search box - sends completion requests. In my case for resource template fields.

{"jsonrpc":"2.0","id":10,"method":"completion/complete","params":{"_meta":{"progressToken":10},"argument":{"name":"query","value":"1232"},"ref":{"type":"ref/resource","uri":"users://search?q={query}&page={page}&limit={limit}"}}}

To Reproduce have a resource template and start typing a parameter. e.g.

{
  "resourceTemplates": [
    {
      "uriTemplate": "users://{user_id}/greeting",
      "name": "getUserGreeting",
      "description": "Returns a greeting for a user by ID"
    },
    {
      "uriTemplate": "users://search?q={query}&page={page}&limit={limit}",
      "name": "searchUsers",
      "description": "Searches users with a query and optional page/limit"
    }
  ]
}

Expected behavior No completion request should be sent to the server it it hasn't explicitly stated that it does support completions.

Image

odrobnik avatar May 24 '25 22:05 odrobnik