| description | ALWAYS use this skill when the user asks to build, modify, or audit a FrontMCP tool.
Covers everything inside `@Tool({...})`: class and function-style tools, Zod input/output
schemas with derived `execute()` types, dependency injection (`this.get` / `this.tryGet`),
error handling (`this.fail`, MCP error classes), throttling (rate-limit / concurrency /
timeout), auth providers (single / multi / vault), availability constraints
(`availableWhen`), elicitation (`this.elicit`), interactive UI widgets via `@Tool({ ui })`
(MCP Apps / SEP-1865 — including `.tsx` FileSource, CSP, `window.FrontMcpBridge`,
host-detect `resourceMode`), annotations (`readOnlyHint` / `destructiveHint` / …),
`examples` metadata, registration in `@App({ tools })`, and per-tool unit testing.
Does NOT cover:
- Read-only data exposed via a URI — use `create-resource`
- Conversation templates / system prompts — use `create-prompt`
- Multi-tool orchestration loops — use `create-agent`
- Background work / pipelines — use `create-job` / `create-workflow`
- Server-level config (transport, sessions, auth modes) — use `config` / `auth`
Triggers: `@Tool`, ToolContext, tool decorator, MCP tool, snake_case tool name,
inputSchema, outputSchema, ToolInputOf, ToolOutputOf, `@Tool({ ui })`, tool UI widget,
MCP Apps widget, FileSource widget, `.tsx` widget, ui.csp, ui.resourceMode,
window.FrontMcpBridge, tool annotations, readOnlyHint, destructiveHint, rate-limit tool,
throttle tool, concurrency tool, tool timeout, this.fail, this.respond, this.fetch,
this.notify, this.progress, this.elicit, ElicitationDisabledError, ToolContext.execute,
this.get(TOKEN), this.tryGet, register tool in @App, tool examples metadata,
availableWhen, missingAxes, `tool()` function builder, Tool.esm, Tool.remote,
PublicMcpError, ResourceNotFoundError, MCP_ERROR_CODES, ui://widget.
|
| when_to_use | Trigger when creating or editing a `*.tool.ts` / `*.tool.tsx` file, adding a `@Tool`
decorator, defining `inputSchema` / `outputSchema` for a tool, deriving `execute()`
parameter or return types, wiring dependency injection into a tool, returning
structured / media / resource content, adding a `ui:` block (HTML / MDX / React /
FileSource), configuring throttling, declaring auth providers, restricting platforms
via `availableWhen`, requesting interactive input via `this.elicit`, adding tool
`annotations`, or registering a tool in `@App({ tools })`.
|
| tags | ["development","tool","create-tool","decorator","input-schema","output-schema","ToolContext","ui","mcp-apps","annotations","throttling","auth-providers","availability","elicitation"] |