filament_get_docs
Fetch official Filament PHP documentation for specific categories and sections to implement admin panel components using Laravel's Filament framework.
Instructions
Fetch documentation from filamentphp.com
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| section | Yes | ||
| version | No | 5.x |
Implementation Reference
- src/tools/index.ts:159-184 (handler)The handler implementation for the `filament_get_docs` tool, which fetches documentation pages from filamentphp.com using `fetchDocPage`.
server.tool("filament_get_docs", "Fetch documentation from filamentphp.com", { category: z.string().min(1), section: z.string().min(1), version: versionSchema, }, async ({ category, section, version }) => { try { const doc = await fetchDocPage(version, category, section); if (!doc) { return { content: [{ type: "text", text: `# Documentation Not Found\n\nAttempted URL: ${getDocUrl(version, category, section)}\n\nTry using \`filament_list_docs\` to see known sections, or \`filament_discover_docs\` for live routes.`, }], }; } return { content: [{ type: "text", text: `# ${doc.title}\n\nURL: ${doc.url}\n\n${doc.sections.map(s => `## ${s.title}\n\n${s.content}`).join("\n\n")}` }] }; } catch (error) { return { content: [{ type: "text", text: formatErrorMessage("Documentation Fetch Failed", error, "Retry later or query a different category/section."), }], }; } });