Skip to content

Feature request: Context-Aware Completion Enhancement (MCP 2025-06-18) #395

@bug-ops

Description

@bug-ops

Summary

Implement context-aware completion from PR #598 to enable intelligent completion suggestions based on previously resolved arguments.
Current completion requests lack context about previously resolved variables, limiting completion intelligence for multi-argument templates.

Solution

Add optional CompletionContext to completion requests:

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct CompletionContext {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub arguments: Option<HashMap<String, String>>,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct CompleteRequestParam {
    pub r#ref: Reference,
    pub argument: ArgumentInfo,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub context: Option<CompletionContext>, // NEW
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions