platform-mcp-tool-widget-coordinate
БесплатноБез исполняемых скриптовНе проверенOrchestrate object-based Lightning Type + HXL widget generation to render the output of a custom MCP server tool backed by an Apex Invocable Action. TRIGGER…
от forcedotcom★ 1 200 звёзд на GitHubОб этом скилле
Rendering a Custom MCP Tool Output With a Widget
Coordinate two object-based Custom Lightning Types (CLTs) and an HXL widget to render the output of a custom MCP server tool whose implementation is an Apex @InvocableMethod. This skill never authors content directly — it loads and invokes leaf skills in dependency order, gates progress on user approval, and runs validation gates before reporting completion.
Ownership boundary — this skill owns only:
- the MCP-tool use case — resolving the tool's output shape and orchestrating the leaf skills in the right order; and
- the envelope CLT's default
renderer.json— the one artifact it authors inline, bridging the envelope to the widget.
The CLTs are authored by platform-custom-lightning-type-generate, and all widget metadata (schema + body + .uiwidget-meta.xml) is authored and validated by platform-widget-generate. This skill never writes widget metadata and never modifies the Apex class — it supplies each leaf skill its inputs and wires the result together.
Scope
Custom MCP server tools backed by an Apex Invocable Action only. The MCP tool returns the platform's invocable-action result envelope — an object with actionName, isSuccess, and an outputValues node that carries the tool's real payload. To render this envelope with a widget, model it as two object-based CLTs (lightning__objectType) of equal standing — the only reason there are two is that one must reference the other by name (a CLT cannot reference itself), so they need distinct deployed names. Name and describe each by what it actually models — never by an invented role-label pair like "Payload CLT"/"Envelope CLT" or "Inner CLT"/"Outer CLT":
- The CLT that mimics the tool-result envelope, named
<toolApiName>. ItsoutputValuesproperty is typed to the other CLT viac__<responseCLT>(the CLT-reference prefix — see the namespace note below). - The CLT that is the exact shape of the Invocable Action's response (
@InvocableVariablefields on the@InvocableMethodresponse class), named<toolApiName>Response— "Response" is not an invented role word; it is the word the Apex source itself uses for that class.
The widget grounds on the response fields (flat), and the default renderer.json in the envelope CLT bridges the envelope nesting to the flat widget via {!$attrs.outputValues.<field>}.
Namespace prefix provenance (
c__/@apexClassType/<ns>__…): the Actions REST describe returns bare, unprefixed class names (Outer$Inner) and no namespace — the prefix is the org's CLT namespace, added by this skill. It isc__in a namespace-less org (the common case, used literally throughout this doc) or the package namespace<ns>__in a packaged org (read from the class'sNamespacePrefix; default toconly when the org has none). Everyc__below is this prefix.
Out of scope, route elsewhere:
- Customizing an Apex-backed agent action output (Apex-backed CLT
@apexClassType/..., single CLT, surface-specific renderer) →platform-lightning-type-widget-coordinate. - A standalone widget with no MCP tool / Lightning Type →
platform-widget-generate. - Authoring only a CLT or only an Apex class →
platform-custom-lightning-type-generate/platform-apex-generate.
Beta cardinality: the invocable-action result is a bulk array (
content[]). For the beta release this skill models and renders a single response — the first element ofcontent[]. The CLT envelope models one result object, not thecontent[]wrapper.
How this differs from platform-lightning-type-widget-coordinate
| Dimension | agent-action flow (...lightning-type-widget-coordinate) |
this MCP-tool flow |
|---|---|---|
| CLT kind | Apex-backed (@apexClassType/...) |
Object-based (lightning__objectType) |
| Number of CLTs | one | two (envelope + response) |
| Field source | @AuraEnabled |
@InvocableVariable on the top-level response class (referenced inner classes: public/@AuraEnabled — see Hard Rule 6) |
| Renderer location | lightningTypes/<T>/lightningDesktopGenAi/renderer.json (surface-specific) |
lightningTypes/<toolCLT>/renderer.json (default, parallel to schema.json) |
| Renderer binding | flat {!$attrs.<field>} |
nested {!$attrs.outputValues.<field>} |
Phase Graph
| Phase | Purpose | Output |
|---|---|---|
| 1 — Input selection | Determine the payload source: an invocable action API name (preferred), an Apex Invocable class, or a pasted tool-output JSON sample. | source (action | apex | sample), tool API name |
| 2 — Payload discovery | Describe the invocable action via the Actions REST API and read its typed outputs (or parse the response class from source, or outputValues from the sample). |
payloadFields (name + lightning:type) |
| 3 — Build plan | Print the plan in full; proceed unless the next reply explicitly pushes back. | printed |
Установить platform-mcp-tool-widget-coordinate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл platform-mcp-tool-widget-coordinate?
Orchestrate object-based Lightning Type + HXL widget generation to render the output of a custom MCP server tool backed by an Apex Invocable Action. TRIGGER only when the prompt EXPLICITLY involves rendering an MCP tool result: user says 'MCP server', 'MCP tool', 'custom MCP server', references a tool 'output schema' / 'tool output' / 'outputValues' envelope, names an 'invocable action' backing an MCP tool, or asks to build a widget or rich UI rendition for the output of an Apex-invocable-backed MCP tool. DO NOT TRIGGER when: customizing an Apex-backed agent action output (use platform-lightning-type-widget-coordinate), authoring only a Custom Lightning Type (use platform-custom-lightning-type-generate), authoring only an Apex class (use platform-apex-generate), or building a standalone widget with no Lightning Type or MCP tool involved (use platform-widget-generate).
Как установить скилл platform-mcp-tool-widget-coordinate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл platform-mcp-tool-widget-coordinate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic