Problem/Motivation
The example prompt configurations shipped by mcp_server_examples define arguments whose valid values are described in prose (e.g. skill_level: beginner/intermediate/advanced, court_surface: hard/clay/grass). However, most of these arguments do not yet expose completion_providers, so MCP clients cannot autocomplete the valid values. This makes the examples less useful for demonstrating the MCP Server argument completion feature.
Proposed resolution
Add static_list completion providers to every example prompt argument that has a known, closed set of valid values. Also add a functional test method, assertPromptArgumentCompletions(), that calls the completion/complete MCP endpoint for each configured argument and verifies the returned values match the static lists.
Remaining tasks
- Add
static_listcompletions tocomprehensive_lesson.lesson_focus. - Add
static_listcompletions tomatch_strategy.opponent_typeandmatch_strategy.court_surface. - Add missing values to
multi_provider_prompt.opponent_typestatic list. - Add
static_listcompletions totennis_resources.topic. - Add
static_listcompletions totennis_tip_basic.skill_levelandtennis_tip_basic.focus_area. - Add
static_listcompletions totest_with_args.skill_levelandtest_with_args.surface. - Add functional test coverage in
McpServerExamplesFunctionalTest.
User interface changes
None.
API changes
None.
Data model changes
None. The mcp_server.mcp_prompt_config.* config schema already supports completion_providers.
Testing instructions
- Install the module and run the functional test:
vendor/bin/phpunit web/modules/contrib/mcp_server_examples/tests/src/Functional/McpServerExamplesFunctionalTest.php
- Alternatively, query the MCP
completion/completeendpoint for each example prompt argument and confirm the returnedvaluesmatch the configured static lists.
Issue fork mcp_server_examples-3604032
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
e0ipso