tool-creator
Design, scaffold, validate, and dry-run callable tools or functions with explicit JSON schemas, side-effect boundaries, and error contracts. Use when creating or reviewing an MCP/function-calling tool
Files7
View on GitHubSKILL.mdskills/tool-creator/SKILL.md
GitHubTool Creator
Create a small, auditable tool package that another agent can call safely and predictably. Keep the model-visible contract separate from the implementation and never place credentials, hidden prompts, or arbitrary code execution in a tool manifest.
Workflow
- Define the operation in plain language: accepted inputs, output shape, failure modes, latency limits, authentication needs, idempotency, and whether it reads or changes external state.
- Scaffold a portable JSON manifest with
scripts/scaffold_tool.py, then edit the generatedfunction.parametersandresult.schemato match the real contract. KeepadditionalProperties: falseunless forward-compatible extras are deliberately justified. - Expose only the provider-neutral function definition to the model. The adapter must parse arguments, validate them against the input schema, normalize safe defaults, and reject unknown or malformed fields before execution.
- Enforce the execution boundary outside the model. Read-only tools may run after validation; write/destructive tools must require explicit action-time approval and an idempotency key. A dry run must not contact the external service.
- Return a stable envelope: success has
{ "ok": true, "tool_name": ..., "result": ... }; failure has{ "ok": false, "tool_name": ..., "error": { "code": ..., "message": ..., "retryable": ... } }. Do not leak tokens, stack traces, or raw provider responses. - Validate the manifest and fixtures with
scripts/validate_tool.py. Test at least one valid call, one invalid call, an unknown-field rejection, output-shape validation, and the approval gate for a mutating mode. - Report what was verified, what was only dry-run, and what still requires a real service or user approval.
Read tool-manifest.md for the portable contract and tool-manifest.schema.json when integrating a JSON-schema-aware validator. The included example is intentionally local and side-effect-free.
Boundaries
- Do not infer permission to send messages, make purchases, delete data, publish, or change accounts from a tool definition alone.
- Do not accept shell commands, executable source, unrestricted URLs, or arbitrary provider parameters as a substitute for a typed contract.
- Keep retries bounded and only retry errors explicitly marked
retryable; never blindly retry a non-idempotent operation.