Skip to main content
Glama

tanstack_list_libraries

List all TanStack libraries with descriptions, supported frameworks, and links. Filter by group: state, headlessUI, performance, or tooling.

Instructions

List all TanStack libraries with their descriptions, supported frameworks, and links

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoFilter by library group

Implementation Reference

  • src/index.ts:193-210 (registration)
    Registration of the 'tanstack_list_libraries' tool via server.tool() with its schema and handler inline.
    // 4. tanstack_list_libraries
    server.tool(
      "tanstack_list_libraries",
      "List all TanStack libraries with their descriptions, supported frameworks, and links",
      {
        group: z
          .enum(["state", "headlessUI", "performance", "tooling"])
          .optional()
          .describe("Filter by library group"),
      },
      async ({ group }) => {
        const args = ["libraries", "--json"];
        if (group) args.push("--group", group);
    
        const { stdout } = await runCli(args);
        return jsonResult(parseJsonOutput(stdout));
      },
    );
  • Input schema definition for 'tanstack_list_libraries': optional 'group' enum filter (state, headlessUI, performance, tooling).
    {
      group: z
        .enum(["state", "headlessUI", "performance", "tooling"])
        .optional()
        .describe("Filter by library group"),
    },
  • Handler function for 'tanstack_list_libraries'. Runs CLI with args ['libraries', '--json'] (plus optional '--group'), parses JSON output, and returns result.
    async ({ group }) => {
      const args = ["libraries", "--json"];
      if (group) args.push("--group", group);
    
      const { stdout } = await runCli(args);
      return jsonResult(parseJsonOutput(stdout));
    },
  • Helper function parseJsonOutput() used to extract JSON from CLI output that may contain text warnings before the JSON blob.
    function parseJsonOutput(stdout: string): unknown {
      // The CLI may print warnings before the JSON blob – find the first { or [
      const jsonStart = stdout.search(/[\[{]/);
      if (jsonStart === -1) {
        throw new Error(`CLI returned non-JSON output:\n${stdout}`);
      }
      return JSON.parse(stdout.slice(jsonStart));
    }
  • Helper function runCli() that executes the TanStack CLI via npx @tanstack/cli with specified args, used by the handler to invoke 'libraries --json'.
    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() };
    }
Behavior3/5

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

No annotations are provided, so the description must cover behavioral traits. It describes the output but does not explicitly state that the operation is read-only or any other constraints. However, 'list' implies non-destructive behavior, which is acceptable for a simple tool.

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 sentence that is front-loaded with the verb and resource. It communicates the essential information without any wasted words.

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

Completeness4/5

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

Given the tool lists libraries with one optional parameter and no output schema, the description adequately specifies the output content (descriptions, frameworks, links). It is sufficiently complete for a simple listing tool.

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?

The input schema has one parameter (group) with 100% coverage, including a description and enum values. The description does not add significant meaning beyond the schema, so the baseline score of 3 applies.

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 clearly states the tool lists all TanStack libraries with specific details (descriptions, frameworks, links). The verb 'list' and resource 'TanStack libraries' are precise, and it distinguishes itself from sibling tools like createTanStackApplication and listTanStackAddOns.

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

Usage Guidelines3/5

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

The description implies usage for general library listing but does not explicitly state when to use this tool versus siblings like tanstack_doc or tanstack_search_docs. No when-not or alternatives are mentioned.

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