[BUG] MCP prompts with only optional arguments require input to invoke
Environment
- Claude CLI version: 1.0.73+
- Operating System: macOS (confirmed), likely affects all platforms
- MCP Server: Custom implementation using @modelcontextprotocol/sdk
Bug Description
MCP prompts that have only optional arguments (all marked as required: false) cannot be invoked through Claude's interface without providing at least one character of input, even though all arguments are optional.
Expected Behavior
Prompts with only optional arguments should be invokable with no input, using the default values or proceeding without arguments.
Actual Behavior
The prompt appears in the slash command list but pressing Enter without typing any arguments does nothing. The prompt can only be invoked by typing at least one character (even just ".").
Reproduction Steps
- Create an MCP server with a prompt that has only optional arguments:
name: example_prompt
description: Example prompt with optional argument
arguments:
- name: optional_param
description: Optional parameter
required: false
default: "default_value"
- Configure the MCP server in Claude Code
- Try to invoke the prompt with
/example_promptand press Enter - Notice the prompt doesn't execute
- Type
/example_prompt .and press Enter - The prompt now executes
Example Real-World Prompts Affected
From the Simone MCP server (https://github.com/Helmi/claude-simone):
check_activity- has optional period argument with default "today"create_changelog- has optional version_type with default "patch"create_commit- has optional issue argumentwork_issue- has optional issue argument (can be gathered interactively)
Workaround
Users must provide at least one character (like ".") to invoke prompts with only optional arguments.
Impact
This affects usability of MCP prompts designed to work with defaults or gather information interactively. It's counterintuitive that optional arguments effectively become required for invocation.
Related Issues
- #4125 discusses MCP prompt argument handling but focuses on multi-word support
- This issue is specifically about optional arguments not being truly optional for invocation
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗