create-tool

create-tool is a skill for Claude Code from agentfront/frontmcp. It costs 456 tokens per session (5,740 once invoked), scanned A, original, Apache-2.0.

A development guide for creating FrontMCP tools—actions that AI clients can call through the Model Context Protocol.

In plain words
What is it for?
Use it to build or review class-based or function-based tools, define schemas, handle failures, add access controls or rate limits, expose tool interfaces, and write unit tests.
Why use it?
It brings input validation, outputs, dependencies, errors, limits, authentication, user interfaces, metadata, registration, and testing into one set of instructions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to build or review class-based or function-based tools, define schemas, handle failures, add access controls or rate limits, expose tool interfaces, and write unit tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentfront/frontmcp/create-tool
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agentfront/frontmcp --skill create-tool
Clone the repo
git clone --depth 1 https://github.com/agentfront/frontmcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentfront/frontmcp/create-tool/github.svg)](https://agentmods.dev/skills/agentfront/frontmcp/create-tool)
Your own site
<a href="https://agentmods.dev/skills/agentfront/frontmcp/create-tool"><img src="https://agentmods.dev/badge/skills/agentfront/frontmcp/create-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentfront/frontmcp/create-tool"><img src="https://agentmods.dev/badge/skills/agentfront/frontmcp/create-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 456 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 101
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 101
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 295
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 220
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 272
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 310
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00456 $0.05740
Opus 5.5 $0.00182 $0.02296
Sonnet 5.5 $0.00091 $0.01148
Haiku 4.5 $0.00046 $0.00574

Measured 5d ago against content hash 9e1437cde29d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-tool scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

YES → use this.fetch(input, init?) (context propagation)
libs/skills/catalog/create-tool/SKILL.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create a FrontMCP Tool

Tools are the primary way to expose executable actions to AI clients in the MCP protocol. In FrontMCP, every tool is a TypeScript class that extends ToolContext, decorated with @Tool({...}), and registered on an @App (or directly on @FrontMcp for simple servers).

This skill is the single source of truth for building tools. It owns:

  • The @Tool decorator surface
  • Input / output schemas and how to derive execute() types from them
  • Dependency injection, error handling, progress / notifications
  • Throttling: rate-limit, concurrency, timeout
  • Auth providers and the credential vault
  • Platform / runtime / surface availability constraints
  • Elicitation (interactive input mid-execution)
  • Tool UI widgets — the ui: block, MCP Apps / SEP-1865, .tsx FileSource, CSP, window.FrontMcpBridge
  • Annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
  • The examples metadata field
  • Function-style tools, remote / ESM tools
  • Registration patterns
  • Per-tool unit testing

For everything else — resources, prompts, agents, jobs, workflows, adapters, plugins, providers, channels — use the matching create-<thing> skill.

First time? Start with references/quick-start.md, then jump to the example matching your scenario via the Decision Tree below.


Inherited defaults

This skill ALWAYS applies these defaults — never opt out without an audited reason:

Default Source What it enforces
inputSchema is a Zod raw shape rules/input-schema-is-raw-shape.md Plain object mapping field → Zod type. Framework wraps internally. Never z.object(...) at the top level.
outputSchema is always defined rules/always-define-output-schema.md Prevents data leaks, enables CodeCall chaining, gives compile-time type safety.
execute() types are derived from the schemas rules/derive-execute-types.md ToolInputOf<> / ToolOutputOf<> over the hoisted schemas. Schema is the single source of truth.
class MyTool extends ToolContext — no generics rules/no-toolcontext-generics.md Types are auto-inferred from @Tool. Explicit generics are redundant and forbidden.
Tool names are snake_case rules/snake-case-tool-names.md MCP protocol convention. get_weather, not getWeather.
No try/catch around execute() rules/no-try-catch-around-execute.md The framework's flow catches and formats errors. Wrapping defeats it.
this.fail(new McpError(…)) for business errors rules/use-this-fail-for-business-errors.md Triggers the error flow with proper JSON-RPC codes. Raw throw skips it.
Register tools in @App({ tools }) rules/register-in-app.md Apps own modularity and lifecycle. Top-level @FrontMcp({ tools }) is the simple-server escape hatch.
.tsx widget paths use fileURLToPath(new URL('./x.tsx', import.meta.url)) rules/widget-paths-anchor-with-import-meta-url.md Relative FileSource paths resolve against process.cwd() — the workaround is mandatory (issue #444).
Leave ui.resourceMode unset by default rules/widget-resource-mode-host-detect.md The framework host-detects: Claude → 'inline', others → 'cdn' (issue #456). Set explicitly only to override.

Read the full file on GitHub · 319 lines

Files

What ships with it

53 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed 9e1437cde29d
  2. 9d ago Changed 4837b60b21f5
  3. 10d ago Changed 36ea06a39139
  4. 15d ago Changed 8f59e7ca0f93
  5. 19d ago Changed 191d1fececcd
  6. 1mo ago First seen · 319 lines · 456 tokens per session scan A e6fd16c98ad3

Subscribe to this mod's changes

create-tool is a skill published in the GitHub repository agentfront/frontmcp (146 stars, last pushed 3d ago), licensed Apache-2.0. It adds 456 tokens to every session and 5,740 once invoked, about $0.0018 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

plugin-develop

A development guide for adding features to Zhin.js plugins, such as chat commands, AI tools, middleware, scheduled tasks, and console pages. Zhin.js is the plugin system it targets.

zhinjs/zhin · 70 tokens

add-app-to-server

This skill should be used when the user asks to "add an app to my MCP server", "add UI to my MCP server", "add a view to my MCP tool", "enrich MCP tools with UI", "add interactive UI to existing server", "add MCP Apps to my server", or needs to add interactive UI capabilities to an existing MCP server that already has…

modelcontextprotocol/ext-apps · 95 tokens

convert-web-app

This skill should be used when the user asks to "add MCP App support to my web app", "turn my web app into a hybrid MCP App", "make my web page work as an MCP App too", "wrap my existing UI as an MCP App", "convert iframe embed to MCP App", "turn my SPA into an MCP App", or needs to add MCP App support to an existing…

modelcontextprotocol/ext-apps · 115 tokens

migrate-oai-app

This skill should be used when the user asks to "migrate from OpenAI Apps SDK", "convert OpenAI App to MCP", "port from window.openai", "migrate from skybridge", "convert openai/outputTemplate", or needs guidance on converting OpenAI Apps SDK applications to MCP Apps SDK. Provides step-by-step migration guidance with…

modelcontextprotocol/ext-apps · 80 tokens

create-mcp-app

This skill should be used when the user asks to "create an MCP App", "add a UI to an MCP tool", "build an interactive MCP View", "scaffold an MCP App", or needs guidance on MCP Apps SDK patterns, UI-resource registration, MCP App lifecycle, or host integration. Provides comprehensive guidance for building MCP Apps…

modelcontextprotocol/ext-apps · 77 tokens

mcp-server-generator

A tool that creates complete MCP server code from a natural-language description. An MCP server is a program that lets an AI agent use external tools or data.

chainlesschain/chainlesschain · 20 tokens