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_list completions to comprehensive_lesson.lesson_focus.
  • Add static_list completions to match_strategy.opponent_type and match_strategy.court_surface.
  • Add missing values to multi_provider_prompt.opponent_type static list.
  • Add static_list completions to tennis_resources.topic.
  • Add static_list completions to tennis_tip_basic.skill_level and tennis_tip_basic.focus_area.
  • Add static_list completions to test_with_args.skill_level and test_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

  1. Install the module and run the functional test:
    vendor/bin/phpunit web/modules/contrib/mcp_server_examples/tests/src/Functional/McpServerExamplesFunctionalTest.php
  2. Alternatively, query the MCP completion/complete endpoint for each example prompt argument and confirm the returned values match the configured static lists.
Command icon 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

    e0ipso created an issue. See original summary.

    e0ipso’s picture

    Status: Active » Fixed

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.