create-tool

An interactive guide for adding a new tool to an xmcp project. A tool is a callable capability with defined inputs and code that performs the requested operation.

In plain words
What is it for?
Use it to create data-query, API, calculation, HTML, or React tools with validation, behavior metadata, and optional widget support.
Why use it?
It collects the tool's name, inputs, behavior, and interface type before generating its implementation, reducing missing or unclear requirements.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00033 $0.00902
Opus 5 $0.00016 $0.00451
Sonnet 5 $0.00007 $0.00180
Haiku 4.5 $0.00003 $0.00090

Measured 3d ago against content hash c0c267dac205, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-tool scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

apps/website/agent-skills/create-tool/SKILL.md · 118 lines

How it starts

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

Create xmcp Tool

You are helping the user create a new xmcp tool. Follow this interactive workflow.

Step 1: Gather Information

Before generating any code, ask the user these questions using AskUserQuestion:

  1. Tool name (if not provided as argument): What should the tool be named? (Use kebab-case)

  2. Handler type: Ask which handler type they need:

    • Standard - For data queries, calculations, API calls (returns string/JSON)
    • Template Literal (HTML) - For HTML widgets with external scripts
    • React Component - For interactive stateful widgets (.tsx file)
  3. Schema fields: What parameters should the tool accept? Ask for:

    • Parameter name
    • Type (string, number, boolean, enum, array, object)
    • Description
    • Whether it's optional
    • Any validation rules
  4. Annotations: Ask about behavior hints:

    • Is it read-only? (doesn't modify environment)
    • Is it destructive? (may delete or modify data)
    • Is it idempotent? (repeated calls have same effect)
    • Does it interact with external world? (openWorldHint)
  5. Widget support (if Template Literal or React): Ask if they need:

    • OpenAI tool invocation messages (invoking/invoked status)
    • Widget accessibility (widgetAccessible)
    • Widget-to-tool communication

Step 2: Generate the Tool

Create the tool file in src/tools/ with the appropriate extension:

  • .ts for Standard and Template Literal handlers
  • .tsx for React Component handlers

File Location

src/tools/{tool-name}.ts   # or .tsx for React

Tool Structure Reference

Every xmcp tool has three main exports:

// 1. Schema (optional) - Define parameters with Zod
export const schema = { /* ... */ };

// 2. Metadata (optional) - Tool configuration
export const metadata: ToolMetadata = { /* ... */ };

// 3. Handler (required) - Default export function
export default function handler(params) { /* ... */ }

Quick Reference

Essential Imports

import { z } from "zod";
import { type InferSchema, type ToolMetadata } from "xmcp";

Read the full file on GitHub · 118 lines

Files

What ships with it

1 file 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. 3d ago First seen · 118 lines · 33 tokens per session scan A c0c267dac205

Subscribe to this mod's changes

create-tool is a skill published in the GitHub repository basementstudio/xmcp (1,324 stars, last pushed 4d ago), licensed MIT. It adds 33 tokens to every session and 902 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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

openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available…

openai/openai-agents-python · 83 tokens

om-create-agents-md

Create or rewrite AGENTS.md files for Open Mercato packages and modules. Use this skill when adding a new package, creating a new module, or when an existing AGENTS.md needs to be created or refactored. Ensures prescriptive tone, the Always/Ask First/Never/Validation Commands boundary structure, MUST-style rules…

open-mercato/open-mercato · 85 tokens

om-share-this-session

Prepare and publicly share a complete sanitized coding-agent session plus a ZIP of this session's generated files, then open an upstream harness-feedback issue. Use when the user says "share this session", "report this agent run", "udostępnij tę sesję", or "zgłoś przebieg agenta". Never use for automatic telemetry or…

open-mercato/open-mercato · 81 tokens

om-module-scaffold

Build a complete standalone business app, module, or CRUD vertical slice using Open Mercato discovery, commands, APIs, ACL/setup, UI, events, search, migrations, and tests. Use for customer management, deal-pipeline changes, CRM lead capture, library/booking/rental systems, "create a module", "add CRUD entity"…

open-mercato/open-mercato · 87 tokens

agentic-code-orchestrator

Unified codebase manipulation, AI deployment, data analysis, and academic delivery engine. Absorbs 6 coding protocols + data-analysis + academic-delivery + spec-driven-dev.

winstonkoh87/Athena-Public · 42 tokens

om-evolve-harness

Add a reproducible standalone agent-harness use case or correct failed routing/context with semantic assertions, one knowledge owner, and before/after evaluation. Use for "add harness case", "agent got this wrong", "extend the harness", "new use case", or "rozszerz harness".

open-mercato/open-mercato · 66 tokens