Skip to main content
Glama

createTanStackApplication

Scaffold a new TanStack Start application with your choice of framework, add-ons, package manager, deployment, and toolchain.

Instructions

Scaffold a new TanStack Start application with the specified add-ons and options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesName of the project directory to create
frameworkNoProject frameworkReact
addOnsNoComma-separated add-on ids to include (e.g. ['drizzle','clerk'])
packageManagerNoPackage manager to use
deploymentNoDeployment adapter
toolchainNoLinter / formatter toolchain
routerOnlyNoUse router-only mode (file-based routing without TanStack Start)
examplesNoInclude demo/example pages
targetDirNoTarget directory for the project root
addOnConfigNoJSON string with add-on configuration options

Implementation Reference

  • src/index.ts:111-191 (registration)
    Registration of the 'createTanStackApplication' tool with the MCP server using server.tool(), including its schema definition.
    server.tool(
      "createTanStackApplication",
      "Scaffold a new TanStack Start application with the specified add-ons and options",
      {
        projectName: z.string().describe("Name of the project directory to create"),
        framework: z
          .enum(["React", "Solid"])
          .default("React")
          .describe("Project framework"),
        addOns: z
          .array(z.string())
          .optional()
          .describe(
            "Comma-separated add-on ids to include (e.g. ['drizzle','clerk'])",
          ),
        packageManager: z
          .enum(["npm", "yarn", "pnpm", "bun", "deno"])
          .optional()
          .describe("Package manager to use"),
        deployment: z
          .enum(["cloudflare", "netlify", "nitro", "railway"])
          .optional()
          .describe("Deployment adapter"),
        toolchain: z
          .enum(["biome", "eslint"])
          .optional()
          .describe("Linter / formatter toolchain"),
        routerOnly: z
          .boolean()
          .optional()
          .describe(
            "Use router-only mode (file-based routing without TanStack Start)",
          ),
        examples: z
          .boolean()
          .optional()
          .describe("Include demo/example pages"),
        targetDir: z
          .string()
          .optional()
          .describe("Target directory for the project root"),
        addOnConfig: z
          .string()
          .optional()
          .describe("JSON string with add-on configuration options"),
      },
      async ({
        projectName,
        framework,
        addOns,
        packageManager,
        deployment,
        toolchain,
        routerOnly,
        examples,
        targetDir,
        addOnConfig,
      }) => {
        const args = ["create", projectName, "--framework", framework];
    
        if (addOns && addOns.length > 0) {
          args.push("--add-ons", addOns.join(","));
        }
        if (packageManager) args.push("--package-manager", packageManager);
        if (deployment) args.push("--deployment", deployment);
        if (toolchain) args.push("--toolchain", toolchain);
        if (routerOnly) args.push("--router-only");
        if (examples === true) args.push("--examples");
        if (examples === false) args.push("--no-examples");
        if (targetDir) args.push("--target-dir", targetDir);
        if (addOnConfig) args.push("--add-on-config", addOnConfig);
    
        // Always non-interactive, no git init (the agent controls git)
        args.push("--no-git");
    
        const { stdout, stderr } = await runCli(args, 120_000);
        return textResult(
          [stdout, stderr].filter(Boolean).join("\n---\n"),
        );
      },
    );
  • Input schema for createTanStackApplication: projectName, framework, addOns, packageManager, deployment, toolchain, routerOnly, examples, targetDir, addOnConfig.
    {
      projectName: z.string().describe("Name of the project directory to create"),
      framework: z
        .enum(["React", "Solid"])
        .default("React")
        .describe("Project framework"),
      addOns: z
        .array(z.string())
        .optional()
        .describe(
          "Comma-separated add-on ids to include (e.g. ['drizzle','clerk'])",
        ),
      packageManager: z
        .enum(["npm", "yarn", "pnpm", "bun", "deno"])
        .optional()
        .describe("Package manager to use"),
      deployment: z
        .enum(["cloudflare", "netlify", "nitro", "railway"])
        .optional()
        .describe("Deployment adapter"),
      toolchain: z
        .enum(["biome", "eslint"])
        .optional()
        .describe("Linter / formatter toolchain"),
      routerOnly: z
        .boolean()
        .optional()
        .describe(
          "Use router-only mode (file-based routing without TanStack Start)",
        ),
      examples: z
        .boolean()
        .optional()
        .describe("Include demo/example pages"),
      targetDir: z
        .string()
        .optional()
        .describe("Target directory for the project root"),
      addOnConfig: z
        .string()
        .optional()
        .describe("JSON string with add-on configuration options"),
    },
  • Handler function that builds CLI args and runs npx @tanstack/cli create to scaffold a new TanStack Start application.
      async ({
        projectName,
        framework,
        addOns,
        packageManager,
        deployment,
        toolchain,
        routerOnly,
        examples,
        targetDir,
        addOnConfig,
      }) => {
        const args = ["create", projectName, "--framework", framework];
    
        if (addOns && addOns.length > 0) {
          args.push("--add-ons", addOns.join(","));
        }
        if (packageManager) args.push("--package-manager", packageManager);
        if (deployment) args.push("--deployment", deployment);
        if (toolchain) args.push("--toolchain", toolchain);
        if (routerOnly) args.push("--router-only");
        if (examples === true) args.push("--examples");
        if (examples === false) args.push("--no-examples");
        if (targetDir) args.push("--target-dir", targetDir);
        if (addOnConfig) args.push("--add-on-config", addOnConfig);
    
        // Always non-interactive, no git init (the agent controls git)
        args.push("--no-git");
    
        const { stdout, stderr } = await runCli(args, 120_000);
        return textResult(
          [stdout, stderr].filter(Boolean).join("\n---\n"),
        );
      },
    );
  • runCli helper used by the handler to execute the TanStack CLI via npx.
    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() };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears full responsibility for disclosing behavioral traits. It fails to mention side effects, file system changes, required permissions, idempotency, or the nature of the scaffolded output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the action and omits any extraneous detail, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (10 parameters, no output schema, no annotations), the description is too sparse. It does not explain what the tool returns, how it behaves with different parameters, or potential side effects, leaving the agent with insufficient context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the parameter descriptions, though it does hint that add-ons and options customize the scaffold.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'scaffold' and identifies the resource 'TanStack Start application', clearly distinguishing this creation tool from sibling listing and documentation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like getAddOnDetails or listTanStackAddOns, nor does it state any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zPeppOz/tanstack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server