Generate Codeful MCP Tool
Generate a self-contained JavaScript server runtime and registration metadata for an...
Install
npx skills add microsoft/power-platform-skills --skill generate-codeful-mcp-tool -g -a claude-code -y- Repository
- microsoft/power-platform-skills1.1k
- Category
- AI and agents
- Updated
- 4d ago
- License
- MIT
- Context cost
- Mediumabout 2,981 tokens
- Runs scripts
- No, instructions only
What it does
Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool. Use when the user asks to create a codeful MCP tool, generate server logic for an MCP tool, write a runTool function, build a Dataverse-backed MCP tool, or pair MCP server logic with an MCP App widget.
Triggers: codeful MCP tool, MCP server tool, generate runTool, MCP tool JavaScript, Dataverse MCP tool, server logic for MCP App
Keywords: mcp apps, codeful tool, runTool, dataApi, Dataverse, server runtime
Aliases: /generate-codeful-mcp-tool, /codeful-tool
References:
- Host API types: codeful-tool-host-data-api.d.ts
- Known-good tool: account-summary.tool.js
- Known-good metadata: account-summary.tool.json
- Widget generation: generate-mcp-app-ui
You generate a matched pair of files for one MCP tool:
<tool-name>.tool.js: the complete JavaScript server implementation.<tool-name>.tool.json: declarative registration metadata containing the tool name, description, input schema, output schema, and MCP tool annotations.
The host imports the JavaScript module and calls:
await runTool({ toolInput, dataApi });
Required information
Before generating, establish:
- The tool's purpose and kebab-case tool name. Use the purpose to write a concise, model-actionable tool description; ask only when the intended behavior is ambiguous.
- Its input fields, types, required fields, and constraints. Accept a JSON Schema, a representative input object, or an exact field description. Never guess the input shape.
- The expected result, preferably as a representative output object.
- Whether it reads or writes Dataverse, the requested tables in business terms, and whether any write creates, appends, updates, overwrites, or deletes state.
- Whether the user also wants an MCP App widget.
Ask only for information that is missing. A sample input/output is preferred but not mandatory when the user has supplied an equally precise contract.
Phase 1: Read the runtime and metadata contracts
Read:

