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", {
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 this is a 'get' operation, implying it's read-only, but doesn't specify what 'detailed information' includes (e.g., properties, usage examples, dependencies), whether there are rate limits, authentication requirements, or error conditions. This leaves significant gaps for an agent to understand how to use it effectively.

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, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficiently communicates the core function, 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.

Completeness2/5

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

Given the complexity (a read operation with 2 parameters, one with an enum), lack of annotations, and no output schema, the description is insufficient. It doesn't explain what 'detailed information' entails, how results are structured, or address potential issues like invalid component names. For a tool that likely returns structured data about components, more context is needed to guide an agent effectively.

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 description coverage is 50% (only the 'component' parameter has a description), and the description adds no additional parameter information beyond what's in the schema. It doesn't explain what 'component' refers to (e.g., is it case-sensitive, what format?), nor does it clarify the 'version' parameter's purpose or default behavior. With partial schema coverage, the description fails to compensate adequately.

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 action ('Get detailed information') and resource ('about a Filament component'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'filament_list_components' or 'filament_get_docs', which might provide related information about Filament components.

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. With siblings like 'filament_list_components' (likely listing components) and 'filament_get_docs' (likely getting documentation), there's clear potential for overlap, but the description offers no comparison or context for choosing this specific tool.

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

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