Skip to content

Add MCP metadata to Playbook and View CRDs#2896

Open
Copilot wants to merge 3 commits intomainfrom
copilot/add-mcp-metadata-to-playbooks
Open

Add MCP metadata to Playbook and View CRDs#2896
Copilot wants to merge 3 commits intomainfrom
copilot/add-mcp-metadata-to-playbooks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

Playbook and View MCP tools lack structured metadata for LLM clients. Tool listings return minimal info (id/name only), and there's no way to configure MCP annotation hints (readOnly, destructive, idempotent, openWorld) from CRD specs.

New MCPMetadata type (api/v1/mcp_metadata.go)

Added to both PlaybookSpec and ViewSpec as an optional mcp field:

spec:
  mcp:
    title: "Restart Pod"
    description: "Deletes and recreates the target pod"
    destructiveHint: true
    openWorldHint: true
    tags: ["kubernetes", "remediation"]

Fields: title, description, readOnlyHint, destructiveHint, idempotentHint, openWorldHint, tags.

MCP tool registration

  • Playbook/View tools now propagate all annotation hints to the MCP server
  • mcp.title/mcp.description override spec defaults when set
  • Category and tags are embedded in tool descriptions for LLM context

Richer list tool responses

  • get_all_playbooks: now returns title, namespace, description, category, icon, tags (previously only id + name)
  • list_all_views: now returns title, namespace, description, icon, tags (previously only tool name strings)

Generated files

CRD manifests, JSON schemas, and deepcopy functions regenerated via make manifests and make generate.

Original prompt

This section details on the original issue you should resolve

<issue_title>Playbooks / Views - Add MCP metdata</issue_title>
<issue_description>Update playbooks and view CRD's / /mcp API to include metadata to be returned to LLM's - identity metadata that is built into the spec, and well known labels / etc supported by Claude, Gemini and Codex</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 2 commits March 19, 2026 11:50
- Add MCPMetadata struct (title, description, readOnlyHint, destructiveHint,
  idempotentHint, openWorldHint, tags) to api/v1/
- Add MCP field to PlaybookSpec and ViewSpec
- Apply MCP annotations when registering playbook/view tools
- Include identity metadata (title, description, category, icon, namespace,
  tags) in playbook and view list tool responses
- Regenerate deepcopy, CRD manifests, and JSON schemas

Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
Copilot AI changed the title [WIP] Add MCP metadata to playbooks and views Add MCP metadata to Playbook and View CRDs Mar 19, 2026
Copilot AI requested a review from moshloop March 19, 2026 11:55
@moshloop
Copy link
Copy Markdown
Member

@copilot regen the resources using make static resource

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 19, 2026

@copilot regen the resources using make static resource

Ran make static — it completed successfully with no changes to generated files. The CRDs, schemas, deepcopy functions, and formatting were already up to date from the previous commit (3fa9456).

@moshloop moshloop marked this pull request as ready for review March 19, 2026 14:18
moshloop added a commit that referenced this pull request Apr 1, 2026
Add MCPMetadata struct with annotation hints (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint) and tags for LLM
tool discovery. Playbook and view tool registration now propagates
these hints and supports title/description overrides.

Incorporates #2896
moshloop added a commit that referenced this pull request Apr 1, 2026
Add MCPMetadata struct with annotation hints (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint) and tags for LLM
tool discovery. Playbook and view tool registration now propagates
these hints and supports title/description overrides.

Incorporates #2896
moshloop added a commit that referenced this pull request Apr 3, 2026
Add MCPMetadata struct with annotation hints (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint) and tags for LLM
tool discovery. Playbook and view tool registration now propagates
these hints and supports title/description overrides.

Incorporates #2896
moshloop added a commit that referenced this pull request Apr 3, 2026
Add MCPMetadata struct with annotation hints (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint) and tags for LLM
tool discovery. Playbook and view tool registration now propagates
these hints and supports title/description overrides.

Incorporates #2896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playbooks / Views - Add MCP metdata

3 participants