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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| version | No | 5.x | |
| maxResults | No |
Implementation Reference
- src/tools/index.ts:224-255 (handler)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."), }], }; } });