Skip to main content
Glama

filament_discover_docs

Find live documentation routes for FilamentPHP admin panels to access official guides and component references for building Laravel applications.

Instructions

Discover live documentation routes from filamentphp.com

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNo5.x

Implementation Reference

  • The core logic for discovering documentation routes from filamentphp.com.
    export async function discoverDocRoutes(version: "4.x" | "5.x"): Promise<DiscoveredDocRoute[]> {
      const docsRootUrl = `${DOCS_BASE_URL}/${version}`;
    
      try {
        const html = await fetchHtml(docsRootUrl);
        const $ = cheerio.load(html);
        const routes = new Map<string, DiscoveredDocRoute>();
    
        $("a[href]").each((_, link) => {
          const href = $(link).attr("href");
          if (!href) {
            return;
          }
    
          const absolute = href.startsWith("http") ? href : `https://filamentphp.com${href}`;
          const routeMatch = absolute.match(new RegExp(`/docs/${version}/([^/#?]+)/([^/#?]+)`));
    
          if (!routeMatch) {
            return;
          }
    
          const category = normalizeSegment(routeMatch[1]);
  • The MCP tool registration and response handling for 'filament_discover_docs'.
    server.tool("filament_discover_docs", "Discover live documentation routes from filamentphp.com", {
      version: versionSchema,
    }, async ({ version }) => {
      try {
        const routes = await discoverDocRoutes(version);
    
        if (routes.length === 0) {
          return {
            content: [{
              type: "text",
              text: "# No Live Routes Found\n\nCould not discover documentation routes right now. Use `filament_list_docs` for fallback static sections.",
            }],
          };
        }
    
        return {
          content: [{
            type: "text",
            text: `# Live Docs Routes (${version})\n\n${routes.map((route) => `- ${route.category}/${route.section} → ${route.url}`).join("\n")}`,
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: formatErrorMessage("Docs Route Discovery Failed", error, "Try again shortly or use `filament_list_docs`."),
          }],
        };
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 'discover live documentation routes' but fails to explain what 'live' entails (e.g., real-time updates, online sources), potential side effects, or response format. This leaves significant gaps in understanding the tool's behavior.

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, efficient sentence with no wasted words, making it easy to parse and front-loaded with the core purpose. It earns its place by succinctly conveying the tool's function.

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 lack of annotations and output schema, the description is incomplete. It doesn't address behavioral traits, return values, or how it differs from sibling tools, leaving the agent with insufficient context for effective use in a complex environment with multiple documentation-related tools.

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?

The description adds no parameter semantics beyond the input schema, which has 0% description coverage but includes an enum for 'version' (4.x, 5.x). Since schema coverage is low, the description doesn't compensate, but the single parameter is simple with clear options, so a baseline score of 3 is appropriate.

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 ('discover') and resource ('live documentation routes from filamentphp.com'), making the purpose evident. However, it doesn't differentiate from siblings like 'filament_get_docs' or 'filament_list_docs', which likely serve similar documentation-related functions, preventing a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives such as 'filament_get_docs' or 'filament_list_docs'. The description lacks context about prerequisites, timing, or exclusions, leaving the agent without usage direction.

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