Skip to main content
Glama

filament_search_docs

Search Filament documentation to find specific sections and implementation details for building admin panels with Laravel's Filament framework.

Instructions

Search Filament docs and return exact section matches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
versionNo5.x
maxResultsNo

Implementation Reference

  • The filament_search_docs tool is registered and implemented in src/tools/index.ts. It calls the `searchDocs` helper function from `../lib/doc-fetcher.js` to perform the search.
    server.tool("filament_search_docs", "Search Filament docs and return exact section matches", {
      query: z.string().min(2),
      version: versionSchema,
      maxResults: z.number().int().min(1).max(20).default(5),
    }, async ({ query, version, maxResults }) => {
      try {
        const matches = await searchDocs(query, version, maxResults);
    
        if (matches.length === 0) {
          return {
            content: [{
              type: "text",
              text: `# No Matches\n\nNo documentation matches found for "${query}" in Filament ${version}.`,
            }],
          };
        }
    
        return {
          content: [{
            type: "text",
            text: `# Search Results for "${query}"\n\n${matches.map((match, index) => `${index + 1}. **${match.title}**\n   - Section: ${match.sectionTitle}\n   - URL: ${match.url}\n   - Snippet: ${match.snippet}`).join("\n\n")}`,
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: formatErrorMessage("Docs Search Failed", error, "Try fewer words or a more specific component name."),
          }],
        };
      }
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions returning 'exact section matches' which gives some context about result precision, but lacks details on permissions, rate limits, error handling, or what constitutes a 'section'. More behavioral traits would be helpful for a search 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 extremely concise—just 7 words—and front-loaded with the core purpose. Every word earns its place with no wasted text, making it easy to scan and understand 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 3 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain parameter usage, result format, or behavioral constraints. For a search tool with multiple parameters, this leaves significant gaps for an AI agent to use it correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'query' should contain, what 'version' selection means for results, or how 'maxResults' affects output. The description adds no meaning beyond the bare schema.

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 ('Search') and target resource ('Filament docs'), and specifies the type of results ('exact section matches'). However, it doesn't explicitly differentiate from sibling tools like 'filament_get_docs' or 'filament_discover_docs', which likely have different search or retrieval approaches.

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 sibling tools, prerequisites, or specific contexts where this search method is preferred over others like 'filament_get_docs' for direct retrieval.

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