Skip to content

Although server doesn't support completions, inspector sends them #436

@odrobnik

Description

@odrobnik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions