Skip to content

Broken positional arguments for custom MCP commands #5700

@LukeSchlangen

Description

@LukeSchlangen

What happened?

  1. Create a custom /find prompt.
  2. Type /find lions
  3. Press Enter
  4. /find lions is overwritten by find --animal=""
custom-prompt-overwrite.mov

What did you expect to happen?

I expect pressing Enter to run the custom MCP command and not to override the text.

Client information

CLI Version          0.1.17
Model                gemini-2.5-pro
Sandbox              no sandbox
OS                   linux
Auth Method          cloud-shell
GCP Project          cloudshell-gca

Login information

Cloud Shell

Anything else we need to know?

Code for the MCP Server

@mcp.prompt()
def find(animal: str) -> str:
    """
    Find which exhibit and trail a specific animal might be located.
    """

    return (
        f"Please find the exhibit and trail information for {animal} in the zoo. "
        f"Respond with '[animal] can be found in the [exhibit] on the [trail].'"
        f"Example: Penguins can be found in The Arctic Exhibit, on the Polar Path."
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't workingpriority/p1Important and should be addressed in the near term.sub-area/mcpIssues related to the Model Context Protocol (MCP).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions