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."),
          }],
        };
      }
    });

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