Skip to main content
Glama
starwind-ui

Starwind UI MCP Server

by starwind-ui

get_documentation

Retrieve documentation links for Starwind UI components, including overviews, installation guides, theming instructions, and component-specific details.

Instructions

Returns documentation links for Starwind UI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of documentation to retrieve (defaults to overview)
componentNoSpecific component to get documentation for (only used when type is components)

Implementation Reference

  • The async handler function that implements the core logic of the 'get_documentation' tool. It processes input arguments to return appropriate documentation URLs, component lists, or specific component info based on the requested type.
    handler: async (args: DocumentationArgs = {}) => {
      const docType = args.type || "overview";
    
      // Base documentation response
      const response: Record<string, any> = {
        timestamp: new Date().toISOString(),
      };
    
      // If requesting component-specific documentation
      if (docType === "components" && args.component) {
        const componentName = args.component.toLowerCase();
    
        // Check if the component name is a valid key in COMPONENTS
        if (componentName in COMPONENTS && isValidComponentName(componentName)) {
          response.documentationType = "component";
          response.component = componentName;
          response.url = COMPONENTS[componentName as ComponentName];
          response.importExample = `import { ${componentName.charAt(0).toUpperCase() + componentName.slice(1)} } from "@/components/starwind/${componentName}";`;
        } else {
          response.documentationType = "components";
          response.url = DOCS_URLS.components;
          response.availableComponents = Object.keys(COMPONENTS);
          response.message = `Component '${args.component}' not found. Please choose from the available components list.`;
        }
      }
      // If requesting general documentation
      else {
        response.documentationType = docType;
    
        // For overview, provide all main links
        if (docType === "overview") {
          response.mainLinks = {
            home: DOCS_URLS.home,
            gettingStarted: DOCS_URLS["getting-started"],
            cli: DOCS_URLS.cli,
            installation: DOCS_URLS.installation,
            theming: DOCS_URLS.theming,
            components: DOCS_URLS.components,
            fullReference: DOCS_URLS.full,
          };
          response.description =
            "Starwind UI is an open-source component library for Astro projects, styled with Tailwind CSS v4. It provides accessible, customizable components that can be added directly to your projects.";
          response.availableComponents = Object.keys(COMPONENTS);
        }
        // For components listing
        else if (docType === "components") {
          response.url = DOCS_URLS.components;
          response.components = Object.entries(COMPONENTS).map(([name, url]) => ({
            name,
            url,
          }));
          response.importPattern =
            'import { ComponentName } from "@/components/starwind/component-name";';
        }
        // For other doc types
        else {
          response.url = DOCS_URLS[docType] || DOCS_URLS.home;
        }
      }
    
      return response;
    },
  • The JSON input schema defining the parameters for the 'get_documentation' tool, including optional 'type' and 'component' fields.
    inputSchema: {
      type: "object",
      properties: {
        type: {
          type: "string",
          description: "Type of documentation to retrieve (defaults to overview)",
          enum: [
            "overview",
            "getting-started",
            "cli",
            "installation",
            "theming",
            "components",
            "full",
          ],
        },
        component: {
          type: "string",
          description:
            "Specific component to get documentation for (only used when type is components)",
        },
      },
      required: [],
    },
  • TypeScript interface defining the input arguments for the documentation tool handler.
    export interface DocumentationArgs {
      /** Type of documentation to retrieve (defaults to 'overview') */
      type?:
        | "overview"
        | "getting-started"
        | "cli"
        | "installation"
        | "theming"
        | "components"
        | "full";
      /** Specific component to get documentation for (only used when type is 'components') */
      component?: string;
    }
  • Registration of the 'get_documentation' tool into the central tools Map, using its exported definition from documentation_tool.ts.
    // Register documentation tool
    tools.set(documentationTool.name, documentationTool);
  • Configuration listing 'get_documentation' as an enabled tool.
      enabled: [
        "get_package_manager",
        "fetch_llm_data",
        "get_documentation",
        "init_project",
        "install_component",
        "update_component",
      ],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns documentation links, implying a read-only operation, but lacks details on rate limits, authentication needs, error handling, or output format. This is a significant gap for a tool with no annotation coverage.

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, efficient sentence that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral details and usage context, making it incomplete for optimal agent operation without additional inference.

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 100% description coverage, clearly documenting both parameters with enums and usage notes. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Returns') and resource ('documentation links for Starwind UI'), making it immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_package_manager' or 'fetch_llm_data', which might also retrieve information, so it doesn't reach the highest score.

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. It doesn't mention any prerequisites, context for usage, or comparisons to sibling tools like 'get_package_manager' or 'init_project', leaving the agent with no explicit usage instructions.

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/starwind-ui/starwind-ui-mcp'

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