Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

mcp-create-adaptive-cardsMCP create adaptive cards 搜索

Agent Skill

mcp-create-adaptive-cards 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

197,568

周安装

8,401

GitHub Stars

31,692

下载量

69,216
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mcp-create-adaptive-cards(MCP create adaptive cards 搜索)
来源仓库:https://github.com/github/awesome-copilot
仓库路径:skills/mcp-create-adaptive-cards
安装命令:
npx skills add https://github.com/github/awesome-copilot --skill mcp-create-adaptive-cards
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/github/awesome-copilot --skill mcp-create-adaptive-cards

简介

Microsoft 365 Copilot 中基于 MCP 的 API 插件的自适应卡响应模板。

  • 支持一致数据格式的静态模板、多种项目类型的动态模板以及具有后备默认值的组合方法
  • 包括基于 JSONPath 的数据映射、条件渲染、数字格式以及针对 Teams、Word 和 PowerPoint 优化的响应式单列布局
  • 提供 TextBlock、FactSet、Image、Container、ColumnSet 等卡片元素以及带有模板语言的操作,用于数据绑定和条件显示
  • 工作流程引导用户通过 API 分析生成适当的响应语义配置以及适当的引用和交互元素

SKILL.md

---
mode: 'agent'
tools: ['changes', 'search/codebase', 'edit/editFiles', 'problems']
description: 'Add Adaptive Card response templates to MCP-based API plugins for visual data presentation in Microsoft 365 Copilot'
model: 'gpt-4.1'
tags: [mcp, adaptive-cards, m365-copilot, api-plugin, response-templates]
---

# Create Adaptive Cards for MCP Plugins

Add Adaptive Card response templates to MCP-based API plugins to enhance how data is presented visually in Microsoft 365 Copilot.

## Adaptive Card Types

### Static Response Templates
Use when API always returns items of the same type and format doesn't change often.

Define in `response_semantics.static_template` in ai-plugin.json:

{ "functions": [ { "name": "GetBudgets", "description": "Returns budget details including name and available funds", "capabilities": { "response_semantics": { "data_path": "$", "properties": { "title": "$.name", "subtitle": "$.availableFunds" }, "static_template": { "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.5", "body": [ { "type": "Container", "$data": "${$root}", "items": [ { "type": "TextBlock", "text": "Name: ${if(name, name, 'N/A')}", "wrap": true }, { "type": "TextBlock", "text": "Available funds: ${if(availableFunds, formatNumber(availableFunds, 2), 'N/A')}", "wrap": true } ] } ] } } } } ] }


### Dynamic Response Templates
Use when API returns multiple types and each item needs a different template.

**ai-plugin.json configuration:**

{ "name": "GetTransactions", "description": "Returns transaction details with dynamic templates", "capabilities": { "response_semantics": { "data_path": "$.transactions", "properties": { "template_selector": "$.displayTemplate" } } } }


**API Response with Embedded Templates:**

{ "transactions": [ { "budgetName": "Fourth Coffee lobby renovation", "amount": -2000, "description": "Property survey for permit application", "expenseCategory": "permits", "displayTemplate": "$.templates.debit" }, { "budgetName": "Fourth Coffee lobby renovation", "amount": 5000, "description": "Additional funds to cover cost overruns", "expenseCategory": null, "displayTemplate": "$.templates.credit" } ], "templates": { "debit": { "type": "AdaptiveCard", "version": "1.5", "body": [ { "type": "TextBlock", "size": "medium", "weight": "bolder", "color": "attention", "text": "Debit" }, { "type": "FactSet", "facts": [ { "title": "Budget", "value": "${budgetName}" }, { "title": "Amount", "value": "${formatNumber(amount, 2)}" }, { "title": "Category", "value": "${if(expenseCategory, expenseCategory, 'N/A')}" }, { "title": "Description", "value": "${if(description, description, 'N/A')}" } ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json" }, "credit": { "type": "AdaptiveCard", "version": "1.5", "body": [ { "type": "TextBlock", "size": "medium", "weight": "bolder", "color": "good", "text": "Credit" }, { "type": "FactSet", "facts": [ { "title": "Budget", "value": "${budgetName}" }, { "title": "Amount", "value": "${formatNumber(amount, 2)}" }, { "title": "Description", "value": "${if(description, description, 'N/A')}" } ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json" } } }


### Combined Static and Dynamic Templates
Use static template as default when item doesn't have template_selector or when value doesn't resolve.

{ "capabilities": { "response_semantics": { "data_path": "$.items", "properties": { "title": "$.name", "template_selector": "$.templateId" }, "static_template": { "type": "AdaptiveCard", "version": "1.5", "body": [ { "type": "TextBlock", "text": "Default: ${name}", "wrap": true } ] } } } }


## Response Semantics Properties

### data_path
JSONPath query indicating where data resides in API response:

"data_path": "$" // Root of response "data_path": "$.results" // In results property "data_path": "$.data.items"// Nested path


### properties
Map response fields for Copilot citations:

"properties": { "title": "$.name", // Citation title "subtitle": "$.description", // Citation subtitle "url": "$.link" // Citation link }


### template_selector
Property on each item indicating which template to use:

"template_selector": "$.displayTemplate"


## Adaptive Card Template Language

### Conditional Rendering

{ "type": "TextBlock", "text": "${if(field, field, 'N/A')}" // Show field or 'N/A' }


### Number Formatting

{ "type": "TextBlock", "text": "${formatNumber(amount, 2)}" // Two decimal places }


### Data Binding

{ "type": "Container", "$data": "${$root}", // Break to root context "items": [ ... ] }


### Conditional Display

{ "type": "Image", "url": "${imageUrl}", "$when": "${imageUrl != null}" // Only show if imageUrl exists }


## Card Elements

### TextBlock

{ "type": "TextBlock", "text": "Text content", "size": "medium", // small, default, medium, large, extraLarge "weight": "bolder", // lighter, default, bolder "color": "attention", // default, dark, light, accent, good, warning, attention "wrap": true }


### FactSet

{ "type": "FactSet", "facts": [ { "title": "Label", "value": "Value" } ] }


### Image

{ "type": "Image", "url": "https://example.com/image.png", "size": "medium", // auto, stretch, small, medium, large "style": "default" // default, person }


### Container

{ "type": "Container", "$data": "${items}", // Iterate over array "items": [ { "type": "TextBlock", "text": "${name}" } ] }


### ColumnSet

{ "type": "ColumnSet", "columns": [ { "type": "Column", "width": "auto", "items": [ ... ] }, { "type": "Column", "width": "stretch", "items": [ ... ] } ] }


### Actions

{ "type": "Action.OpenUrl", "title": "View Details", "url": "https://example.com/item/${id}" }


## Responsive Design Best Practices

### Single-Column Layouts
- Use single columns for narrow viewports
- Avoid multi-column layouts when possible
- Ensure cards work at minimum viewport width

### Flexible Widths
- Don't assign fixed widths to elements
- Use "auto" or "stretch" for width properties
- Allow elements to resize with viewport
- Fixed widths OK for icons/avatars only

### Text and Images
- Avoid placing text and images in same row
- Exception: Small icons or avatars
- Use "wrap": true for text content
- Test at various viewport widths

### Test Across Hubs
Validate cards in:
- Teams (desktop and mobile)
- Word
- PowerPoint
- Various viewport widths (contract/expand UI)

## Complete Example

**ai-plugin.json:**

{ "functions": [ { "name": "SearchProjects", "description": "Search for projects with status and details", "capabilities": { "response_semantics": { "data_path": "$.projects", "properties": { "title": "$.name", "subtitle": "$.status", "url": "$.projectUrl" }, "static_template": { "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.5", "body": [ { "type": "Container", "$data": "${$root}", "items": [ { "type": "TextBlock", "size": "medium", "weight": "bolder", "text": "${if(name, name, 'Untitled Project')}", "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Status", "value": "${status}" }, { "title": "Owner", "value": "${if(owner, owner, 'Unassigned')}" }, { "title": "Due Date", "value": "${if(dueDate, dueDate, 'Not set')}" }, { "title": "Budget", "value": "${if(budget, formatNumber(budget, 2), 'N/A')}" } ] }, { "type": "TextBlock", "text": "${if(description, description, 'No description')}", "wrap": true, "separator": true } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "View Project", "url": "${projectUrl}" } ] } } } } ] }


## Workflow

Ask the user:
1. What type of data does the API return?
2. Are all items the same type (static) or different types (dynamic)?
3. What fields should appear in the card?
4. Should there be actions (e.g., "View Details")?
5. Are there multiple states or categories requiring different templates?

Then generate:
- Appropriate response_semantics configuration
- Static template, dynamic templates, or both
- Proper data binding with conditional rendering
- Responsive single-column layout
- Test scenarios for validation

## Resources

- [Adaptive Card Designer](https://adaptivecards.microsoft.com/designer) - Visual design tool
- [Adaptive Card Schema](https://adaptivecards.io/schemas/adaptive-card.json) - Full schema reference
- [Template Language](https://learn.microsoft.com/en-us/adaptive-cards/templating/language) - Binding syntax guide
- [JSONPath](https://www.rfc-editor.org/rfc/rfc9535) - Path query syntax

## Common Patterns

### List with Images

{ "type": "Container", "$data": "${items}", "items": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "width": "auto", "items": [ { "type": "Image", "url": "${thumbnailUrl}", "size": "small", "$when": "${thumbnailUrl != null}" } ] }, { "type": "Column", "width": "stretch", "items": [ { "type": "TextBlock", "text": "${title}", "weight": "bolder", "wrap": true } ] } ] } ] }


### Status Indicators

{ "type": "TextBlock", "text": "${status}", "color": "${if(status == 'Completed', 'good', if(status == 'In Progress', 'attention', 'default'))}" }


### Currency Formatting

{ "type": "TextBlock", "text": "$${formatNumber(amount, 2)}" }

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.71%
按下载量换算24,717

Claude

31.97%
按下载量换算22,128

Cursor

17.47%
按下载量换算12,092

Gemini CLI

9.63%
按下载量换算6,666

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills