Skip to content

Expose MCP prompts that mirror skill workflows using tool names #299

@mglaman

Description

@mglaman

Context

The skills/drupalorg-cli/SKILL.md and reference files in skills/drupalorg-cli/references/ document end-to-end workflows using CLI command names (e.g. issue:apply, issue:branch). When surfaced as MCP prompts as-is, they're not useful to an MCP client because the MCP server exposes tools (e.g. get_issue, get_issue_branch_name), not CLI commands.

Proposed Work

Create PromptRegistry.php in src/Api/Mcp/ with #[McpPrompt]-annotated methods that provide workflow guidance written in terms of MCP tool names rather than CLI commands.

This could be implemented in a few ways:

  1. Author new prompt content — write MCP-native workflow documentation that references tool names directly.
  2. Transform skill content at runtime — post-process the existing skill markdown, substituting CLI command references with their MCP tool equivalents.
  3. Separate prompt source files — add MCP-specific workflow markdown files alongside the existing skill references.

Acceptance Criteria

  • listPrompts returns prompts for the main skill reference and each workflow (work-on-issue, patch contribution, GitLab MR contribution).
  • Prompt content references MCP tool names (e.g. get_issue, list_merge_requests) rather than CLI commands.
  • PHPStan level 6, PSR-2, and all unit tests continue to pass.

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