Skip to content

Let prompts and resource templates define their own completions #1312

Description

@chemicL

In the modern server, completion is a single function for the whole server. It receives every completion/complete request, so whoever writes it has to know about every prompt and resource template and decide what each one's arguments should complete to. Completion logic for unrelated prompts and templates ends up in one place, separate from the definitions it belongs to.

Instead, each prompt and resource template would define how its own arguments are completed, and the server would route each request to the prompt or template it refers to. With routing in place:

  • A prompt's suggestions stay next to its definition, and so do a template's.
  • References to unknown prompts or templates, and arguments they don't declare, are rejected by the server, the same way prompts/get and resources/read already handle unknown names.
  • Template variables can be completed, because a template can be looked up by its URI template.
  • Custom features can complete their own references.

This brings completions in line with the rest of the modern feature model, where each feature is responsible for its own primitives.

Activity

  1. added this to the 2.2.0-M3 milestone on Nov 3, 2026
  2. self-assigned this
    on Nov 3, 2026
  3. added
    enhancementNew feature or request
    P2Moderate issues affecting some users, edge cases, potentially valuable feature
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Moderate issues affecting some users, edge cases, potentially valuable featurearea/serverenhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions