Skip to content

mcp: server-defined prompts for common workflows - #98

Closed
Mike Krüger (mkrueger) wants to merge 1 commit into
dev/mkrueger/mcpfrom
dev/mkrueger/mcp-prompts
Closed

Mike Krüger (mkrueger) wants to merge 1 commit into
dev/mkrueger/mcpfrom
dev/mkrueger/mcp-prompts

Conversation

@mkrueger

Copy link
Copy Markdown
Collaborator

Summary

Splits the server-defined MCP prompts out of #94 so they can be reviewed
independently (per jawelton74's review thread — there's an open product
question about whether query-optimization / data-modeling guidance belongs in
the shell vs. the PM toolkit / data-modeling work).

This PR is stacked on dev/mkrueger/mcp (#94) and only contains the prompt
feature; #94 itself is now prompt-free.

What this adds

  • PromptOperations.cs — [McpServerPromptType] exposing five ready-made
    workflows that MCP clients surface as slash-commands. Each prompt emits a
    short user message that steers the model toward the shell's own tools
    (query, mkitem, create) and resources (indexing-policy):
    • cosmos.explain-container
    • cosmos.query-optimize
    • cosmos.partition-key-audit
    • cosmos.bulk-import-plan
    • cosmos.connect-help
  • McpServer.cs — declares the prompts capability and registers
    WithPrompts<PromptOperations>().
  • ResourceCompletionOperations.cs — adds database / container
    prompt-argument completion (reusing the live discovery path already used for
    resource-template completion).
  • docs/mcp.md — documents the prompt set and that completion fires for their
    database / container arguments.
  • PromptOperationsTests.cs — covers prompt content, scope fallback, and JSON
    escaping of embedded quotes/backslashes.

Open discussion

cosmos.query-optimize (and arguably cosmos.partition-key-audit) overlap with
other efforts. Holding for the discussion with Sajee before merge; the thinner,
shell-native prompts (explain-container, connect-help, bulk-import-plan)
are less contentious.

Validation

  • dotnet build CosmosDBShell/CosmosDBShell.csproj ✔
  • dotnet build CosmosDBShell.Tests/CosmosDBShell.Tests.csproj ✔
  • Prompt tests: 10 passed, 0 failed
Adds the PromptOperations MCP prompt set (explain-container, query-optimize, partition-key-audit, bulk-import-plan, connect-help) and their database/container prompt-argument completion, plus docs. Split out of #94 for independent review.
@sajeetharan

Copy link
Copy Markdown
Member

Mike Krüger (@mkrueger) please do not merge this, there are multiple MCPs we have within Cosmos DB and seem to be doing similar operations, we are trying to converge them, will share more details soon!

@mkrueger

Mike Krüger (mkrueger) commented Jun 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

y I close it - I think this needs to be redone then. I leave the branch stay for now.

@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/mcp-prompts branch September 2, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants