getAddOnDetails
Retrieve files, dependencies, options, and routes for a TanStack Start add-on using its identifier and optional framework.
Instructions
Get detailed information about a specific TanStack Start add-on (files, dependencies, options, routes)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addonId | Yes | Add-on identifier (e.g. drizzle, clerk, shadcn, prisma, sentry) | |
| framework | No | Project framework | React |
Implementation Reference
- src/index.ts:82-108 (registration)Tool 'getAddOnDetails' is registered via server.tool() on the McpServer instance (line 83). It is the second tool in the server definition, registered with the name 'getAddOnDetails'.
// 2. getAddOnDetails server.tool( "getAddOnDetails", "Get detailed information about a specific TanStack Start add-on (files, dependencies, options, routes)", { addonId: z .string() .describe( "Add-on identifier (e.g. drizzle, clerk, shadcn, prisma, sentry)", ), framework: z .enum(["React", "Solid"]) .default("React") .describe("Project framework"), }, async ({ addonId, framework }) => { const { stdout } = await runCli([ "create", "--addon-details", addonId, "--framework", framework, "--json", ]); return jsonResult(parseJsonOutput(stdout)); }, ); - src/index.ts:97-107 (handler)The handler function for getAddOnDetails. It executes the TanStack CLI with args ['create', '--addon-details', addonId, '--framework', framework, '--json'], parses the JSON output, and returns it as a text result.
async ({ addonId, framework }) => { const { stdout } = await runCli([ "create", "--addon-details", addonId, "--framework", framework, "--json", ]); return jsonResult(parseJsonOutput(stdout)); }, - src/index.ts:86-96 (schema)Input schema for getAddOnDetails defining two parameters: 'addonId' (string, required) and 'framework' (enum ['React','Solid'], defaults to 'React').
{ addonId: z .string() .describe( "Add-on identifier (e.g. drizzle, clerk, shadcn, prisma, sentry)", ), framework: z .enum(["React", "Solid"]) .default("React") .describe("Project framework"), }, - src/index.ts:18-32 (helper)The runCli helper that executes the CLI command (npx @tanstack/cli create --addon-details ...) via execFileAsync. Used by the handler to invoke the underlying TanStack CLI.
async function runCli( args: string[], timeoutMs = 60_000, ): Promise<{ stdout: string; stderr: string }> { const { stdout, stderr } = await execFileAsync( TANSTACK_CLI, [...TANSTACK_ARGS, ...args], { timeout: timeoutMs, maxBuffer: 10 * 1024 * 1024, // 10 MB env: { ...process.env, NO_COLOR: "1" }, }, ); return { stdout: stdout.trim(), stderr: stderr.trim() }; } - src/index.ts:43-49 (helper)The jsonResult helper wraps data in the MCP text content format after JSON serialization. Used by the handler to format the CLI output as a tool result.
function textResult(text: string) { return { content: [{ type: "text" as const, text }] }; } function jsonResult(data: unknown) { return textResult(JSON.stringify(data, null, 2)); }