Official agent skill

Generate Codeful MCP Tool

by microsoft in microsoft/power-platform-skills

Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool.

OfficialMITAuto-check: notesAgent Workflows

Install Generate Codeful MCP Tool

skills CLI
$ npx skills add microsoft/power-platform-skills --skill generate-codeful-mcp-tool -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/power-platform-skills generate-codeful-mcp-tool --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/mcp-apps/skills/generate-codeful-mcp-tool .claude/skills/generate-codeful-mcp-tool && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-codeful-mcp-tool
GitHub stars
967
Token cost
~3.1k tokens
SKILL.md length
1,408 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool.

  • Works in 4 steps: Read the runtime and metadata contracts → Verify Dataverse schema when needed → Generate the paired tool artifacts → …
  • The user asks to create a codeful MCP tool
  • SKILL.md covers Required information, Phase 1: Read the runtime and…, Phase 2: Verify Dataverse… and Phase 3: Generate the paired…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Generate Codeful MCP Tool is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. 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.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol and JavaScript. The repository describes itself as: A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and… The licence is MIT.

When your agent uses it

  • 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

Example prompts

  • “/generate-codeful-mcp-tool”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Read the runtime and metadata contracts
  2. Verify Dataverse schema when needed
  3. Generate the paired tool artifacts
  4. Validate

What it can do on your machine

Read from SKILL.md and the folder at commit 5ef4e4f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep
    • AskUserQuestion
    • Skill

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, powershell and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • modelcontextprotocol.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Codeful MCP Tool loads about 3.1k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 1,408 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/power-platform-skills at commit 5ef4e4f, republished under its MIT licence (© microsoft). 1,408 words, ~3,124 tokens.

Download SKILL.mdSave it as .claude/skills/generate-codeful-mcp-tool/SKILL.md (or your agent's skills folder).
name
generate-codeful-mcp-tool
description
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.
allowed-tools
Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill
version
1.0.0
author
Microsoft Corporation
argument-hint
<tool purpose, inputs, and expected result>
user-invocable
true

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:


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:

javascript
await runTool({ toolInput, dataApi });

Required information

Before generating, establish:

  1. 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.
  2. 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.
  3. The expected result, preferably as a representative output object.
  4. Whether it reads or writes Dataverse, the requested tables in business terms, and whether any write creates, appends, updates, overwrites, or deletes state.
  5. 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:

text
${PLUGIN_ROOT}/references/codeful-tool-host-data-api.d.ts
${PLUGIN_ROOT}/samples/account-summary.tool.js
${PLUGIN_ROOT}/samples/account-summary.tool.json

The generated runtime is plain ESM JavaScript, and the sidecar is plain JSON. Type files are generation-time references only and MUST NOT be imported by the output.

Phase 2: Verify Dataverse schema when needed

Skip this phase when the tool does not use Dataverse.

For a Dataverse-backed tool:

  1. Confirm PAC CLI is authenticated to the intended environment.

  2. Discover candidate tables:

    powershell
    pac model list-tables --search "table terms"

    --search is substring-based. Post-filter its output and accept a table only when its logical name exactly matches the selected result. If multiple tables remain plausible, ask the user to choose.

  3. Create a unique temporary directory outside the final output path and generate types:

    powershell
    pac model genpage generate-types --data-sources "logical1,logical2" --output-file "<temp>/RuntimeTypes.ts"
  4. Read RuntimeTypes.ts. Extract the registered tables, exact readable/writable logical columns, lookup shapes, choice names, and raw numeric choice values.

  5. Use ONLY names and values verified in that file. Custom columns are unpredictable; do not derive them from display names.

If discovery or type generation fails, stop and report the error. Do not fall back to invented tables or columns. Delete the temporary types and directory after validation so the final output contains only the requested .tool.js, .tool.json, and optional widget files.

Phase 3: Generate the paired tool artifacts

Write <tool-name>.tool.js and <tool-name>.tool.json in the user's working directory unless they requested another output directory. Both files MUST use the same basename, which MUST equal the confirmed kebab-case tool name.

The JavaScript file MUST:

  • Export exactly one MCP entry point named runTool, preferably:

    javascript
    export async function runTool({ toolInput, dataApi }) {
      // complete implementation
    }
  • Be self-contained JavaScript with no runtime imports, packages, network calls, filesystem access, environment-variable access, or generated-type dependency.

  • Validate all externally supplied toolInput before using it. Apply bounds to counts and escape values interpolated into OData filters.

  • Use singular Dataverse entity logical names. Use exact logical column names in select, filter, orderBy, and row objects.

  • Read choice and lookup labels from "<column>@OData.Community.Display.V1.FormattedValue".

  • Access query rows through page.rows. Follow page.loadMoreRows() only while page.hasMoreRows is true and the function exists.

  • Set lookups through the verified _<field>_value shape from RuntimeTypes.ts; never emit raw Web API @odata.bind keys.

  • Let dataApi failures throw. Catch only when adding useful context, and rethrow with the original error as the cause. Never return a success-shaped fallback after a failed read or write.

  • Contain no placeholders, TODOs, ellipses, test credentials, or real environment IDs.

  • Return JSON-serializable values only. Never return loadMoreRows, functions, class instances, or cyclic objects.

  • Emit telemetry only when the user explicitly asks for it, and never include tool inputs, row contents, identifiers, or other user data in telemetry properties.

The JSON sidecar MUST be valid JSON with exactly these top-level fields:

json
{
  "name": "account-summary",
  "description": "Search accounts and return revenue and status summaries.",
  "annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "outputSchema": {
    "type": "object",
    "properties": {}
  }
}
  • name: exactly the confirmed tool name and the shared file basename.
  • description: concise, model-actionable guidance explaining what the tool does and when to call it. Do not copy the user's prompt verbatim or include implementation details.
  • annotations: MCP ToolAnnotations describing the tool's behavior. Always emit all four boolean hints:
    • readOnlyHint: true only when the tool cannot modify Dataverse or any other state.
    • destructiveHint: true when the tool may delete, overwrite, or otherwise cause a destructive update. Set it to false for read-only tools and non-destructive creates or additive writes.
    • idempotentHint: true when repeated calls with the same valid input have no additional effect. Reads, deterministic calculations, and updates that set the same values are idempotent; creates and append-style operations are not.
    • openWorldHint: always false because the codeful runtime cannot access arbitrary external systems. Infer these values from the generated implementation and requested behavior. If the write semantics are genuinely ambiguous, ask before generating rather than guessing. Treat annotations as advisory metadata, not as a substitute for runtime validation or authorization.
  • inputSchema: the complete JSON Schema for toolInput. Use an object root, list every accepted field under properties, identify required fields with required, encode runtime constraints such as bounds, formats, enums, and array item shapes, and set additionalProperties: false unless the user explicitly requires extensible input.
  • outputSchema: the JSON Schema for the model-visible structuredContent business payload. For a plain-object return, describe the complete returned object because the host promotes it to structuredContent. For an envelope return, describe only its structuredContent property. Never include content, authored meta, or runtime _meta in outputSchema.

Use standard JSON Schema keywords only. Do not include credentials, environment identifiers, Dataverse discovery artifacts, host configuration, JavaScript expressions, comments, or placeholders in the sidecar.

Show full SKILL.md (476 more words)Show less

Result-channel contract

Choose the smallest correct result shape.

Simple structured result

Return a plain object when all useful output belongs in model-visible structured data:

javascript
return { records, totalCount: records.length };

The host promotes that object to MCP structuredContent.

Partitioned MCP result

Return an envelope when the channels have different audiences:

javascript
return {
  content: `Found ${records.length} records.`,
  structuredContent: { records },
  meta: { preferredView: "table" },
};
  • content: model-visible conversational text, either a string or text content blocks.
  • structuredContent: model-visible machine-readable object.
  • meta: widget-only object. The host maps it to MCP _meta; widgets read result._meta.

The names content, structuredContent, and meta are reserved envelope keys. If a business payload naturally has any of those keys, wrap the whole payload explicitly:

javascript
return { structuredContent: businessPayload };

Do not mix envelope keys with unrelated top-level business fields.

Phase 4: Validate

Before reporting completion:

  1. Confirm exactly one final .tool.js and one matching .tool.json were created for this skill.
  2. Import the file as an ESM data URL with Node.js and assert that runTool is a function. Importing MUST NOT execute data access or other top-level side effects.
  3. Parse the sidecar with JSON.parse. Confirm it has exactly name, description, annotations, inputSchema, and outputSchema; the name matches both filenames; all four annotation hints are booleans, openWorldHint is false, the other hints match the implementation's actual behavior, both schemas have object roots, and every input constraint enforced by the runtime is represented in inputSchema.
  4. Grep the output for imports, require, placeholders, guessed columns, and unsupported host access.
  5. When representative input/output was supplied, invoke runTool with an in-memory mock dataApi from an inline Node script. Do not create a persistent test file.
  6. Confirm the returned value matches the requested result contract, contains no functions or non-serializable values, and its structured payload conforms to outputSchema. Confirm the representative input conforms to inputSchema.
  7. Delete all temporary schema artifacts.

Optional MCP App handoff

When the user asks for a widget:

  1. Finish and validate the paired .tool.js and .tool.json first.
  2. Build a representative result sample:
    • Plain tool return -> treat it as structuredContent.
    • Envelope return -> pass content, structuredContent, and _meta (renamed from the authored meta field).
  3. Invoke generate-mcp-app-ui with the visual requirements, tool name, input sample, and representative full result. Forward an explicit CDN policy from the user's request. If none was supplied, let the UI skill ask its required CDN-policy question; do not assume public URLs are allowed.
  4. Keep the outputs separate: one .tool.js, one .tool.json, and one single-file .html using the selected CDN policy.

Refinement

When editing an existing codeful tool, read both paired files and change only the requested behavior. Keep runtime validation and metadata schemas synchronized. Re-run schema verification if the edit introduces a table, column, lookup, or choice value not already verified for the file.

Completion response

State both generated tool file paths and summarize the description, tool annotations, input contract, and structured result contract. If a widget was requested, also state the HTML path and which result channels it consumes.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/mcp-apps/skills/generate-codeful-mcp-tool of microsoft/power-platform-skills.

Open the folder on GitHubat commit 5ef4e4f

Compare with similar skills

Generate Codeful MCP Tool next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Codeful MCP Tool compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Codeful MCP Tool this skillmicrosoft/power-platform-skills967—~3.1kAutomated safety check: NotesMIT
MCP JS Reverse Playbookhaikow/claude-reverse-skills114—~771Automated safety check: PassNone
MCP Debuggerdebugmcp/mcp-debugger171—~3.8kAutomated safety check: PassMIT
SlintMoosync/Moosync259—~2.4kAutomated safety check: PassGPL-3.0
Browser Testing With Devtoolsshashankswe2020-ux/whoop-mcp166—~3kAutomated safety check: WarnMIT
Bright Data MCPbrightdata/skills2641 repos~3.7kAutomated safety check: PassMIT

Similar skills

  • MCP JS Reverse Playbook

    haikow/claude-reverse-skills

    在使用 js-reverse-mcp 做前端 JavaScript 逆向时使用,适用于签名链路定位、页面观察取证、运行时采样、本地补环境复现与证据化输出。优先适配当前环境里的 js-reverse 工具。

    114 GitHub stars~771 tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Debugger

    debugmcp/mcp-debugger

    A skill your agent uses when investigating a bug, failing test, or unexpected runtime behavior and the mcp-debugger MCP server is available — drives real step-through debuggers (breakpoints, stack…

    171 GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Slint

    Moosync/Moosync

    Expert guidance for building, debugging, and working with Slint GUI applications.

    259 GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Browser Testing With Devtools

    shashankswe2020-ux/whoop-mcp

    Tests in real browsers. An agent skill from shashankswe2020-ux/whoop-mcp.

    166 GitHub stars~3k tokensUpdated today
    Testing & QAAuto-check: warnings
  • Bright Data MCP

    brightdata/skills

    Bright Data MCP handles ALL web data operations. An agent skill from brightdata/skills.

    264 GitHub starsUsed in 1 repo~3.7k tokens
    Productivity & AutomationAuto-check passed
  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed

More from microsoft/power-platform-skills

All 87 skills in this repo
  • Manage Firewall

    microsoft/power-platform-skills

    Official

    Inspects and configures the web application firewall (WAF) in front of a Power Pages production site.

    967 GitHub stars~4.5k tokensUpdated today
    Auto-check: notes
  • Manage Headers

    microsoft/power-platform-skills

    Official

    Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related…

    967 GitHub stars~3k tokensUpdated today
    Auto-check: notes
  • Scan Code

    microsoft/power-platform-skills

    Official

    Scans a Power Pages site project for security issues in source code and dependencies.

    967 GitHub stars~3.4k tokensUpdated today
    Auto-check: notes
  • Scan Site

    microsoft/power-platform-skills

    Official

    Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary.

    967 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes
  • Setup Datamodel

    microsoft/power-platform-skills

    Official

    Creates Dataverse tables, columns, and relationships for a Power Pages site based on a data model proposal.

    967 GitHub stars~4k tokensUpdated today
    Auto-check: notes
  • Add Server Logic

    microsoft/power-platform-skills

    Official

    Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime.

    967 GitHub stars~18k tokensUpdated today
    Auto-check: notes

Categories

Questions about Generate Codeful MCP Tool

What does Generate Codeful MCP Tool do?

Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool. Generate Codeful MCP Tool is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool.

When should I use Generate Codeful MCP Tool?

Generate Codeful MCP Tool fits situations like: 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.

How do I install Generate Codeful MCP Tool in Claude Code?

Run `npx skills add microsoft/power-platform-skills --skill generate-codeful-mcp-tool -a claude-code`. Or copy the skill folder (plugins/mcp-apps/skills/generate-codeful-mcp-tool in microsoft/power-platform-skills) into .claude/skills/generate-codeful-mcp-tool in your project. Claude Code loads it when a task matches its description.

How do I install Generate Codeful MCP Tool in Codex?

Run `npx skills add microsoft/power-platform-skills --skill generate-codeful-mcp-tool -a codex`. Or copy the skill folder (plugins/mcp-apps/skills/generate-codeful-mcp-tool in microsoft/power-platform-skills) into .agents/skills/generate-codeful-mcp-tool in your project. Codex loads it when a task matches its description.

Can I use Generate Codeful MCP Tool in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/power-platform-skills --skill generate-codeful-mcp-tool -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-codeful-mcp-tool, .gemini/skills/generate-codeful-mcp-tool, .github/skills/generate-codeful-mcp-tool and .opencode/skills/generate-codeful-mcp-tool in your project.

What does Generate Codeful MCP Tool need to run?

SKILL.md names no scripts, command-line tools or credentials: Generate Codeful MCP Tool is instructions for the agent only. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill.

Does Generate Codeful MCP Tool access the network?

SKILL.md names 1 domain. As links in the text: modelcontextprotocol.io. This is read from the text; nothing was executed.

Is Generate Codeful MCP Tool safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Generate Codeful MCP Tool use?

Generate Codeful MCP Tool is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Codeful MCP Tool use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generate Codeful MCP Tool?

Skills that share tags, products or a category with Generate Codeful MCP Tool: MCP JS Reverse Playbook (haikow/claude-reverse-skills, 114 stars), MCP Debugger (debugmcp/mcp-debugger, 171 stars), Slint (Moosync/Moosync, 259 stars) and Browser Testing With Devtools (shashankswe2020-ux/whoop-mcp, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Codeful MCP Tool?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/power-platform-skills, which has 967 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/power-platform-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.