Skip to main content
Glama

filament_get_component

Retrieve detailed information about Filament components to understand their properties, usage, and implementation in Laravel admin panels.

Instructions

Get detailed information about a Filament component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesComponent name (e.g., TextInput, Select)
versionNo5.x

Implementation Reference

  • The handler implementation for the "filament_get_component" tool, which searches for a component in the Filament reference data and returns details.
    server.tool("filament_get_component", "Get detailed information about a Filament component", {
      component: componentSchema,
      version: versionSchema,
    }, async ({ component, version }) => {
      const reference = version === "4.x" ? filamentV4Reference : filamentV5Reference;
      for (const category of reference.categories) {
        const found = category.components.find(c => c.name.toLowerCase() === component.toLowerCase());
        if (found) {
          return { content: [{ type: "text", text: `# ${found.name}\n\n**Namespace:** \`${found.namespace}\`\n\n**Description:** ${found.description}\n\n**Docs:** ${found.docsUrl}\n\n**Examples:**\n\`\`\`php\n${found.examples?.join("\n") || "None"}\n\`\`\`` }] };
        }
      }
      return { content: [{ type: "text", text: `Component "${component}" not found.` }] };
    });
  • Schema definitions for the "filament_get_component" tool inputs.
    const versionSchema = z.enum(["4.x", "5.x"]).default("5.x");
    const componentSchema = z.string().min(1).describe("Component name (e.g., TextInput, Select)");
    const descriptionSchema = z.string().min(5).describe("What you want to build");
  • Tool registration for "filament_get_component" within the registerFilamentTools function.
    server.tool("filament_get_component", "Get detailed information about a Filament component", {

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/serbansorin/filament-mcp-server'

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