Skip to main content
Glama

filament_generate_plan

Create a structured implementation plan for building Filament admin panels by defining project requirements, models, and relationships.

Instructions

Generate a Filament implementation plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesWhat you want to build
versionNo5.x
modelsNo

Implementation Reference

  • Handler for the "filament_generate_plan" tool which uses PlanGenerator or generateQuickPlan to generate a Filament implementation plan based on the provided description and model definitions.
    server.tool("filament_generate_plan", "Generate a Filament implementation plan", {
      description: descriptionSchema,
      version: versionSchema,
      models: z.array(z.object({
        name: z.string(),
        attributes: z.array(z.object({ name: z.string(), type: z.string(), required: z.boolean().optional() })).optional(),
        relationships: z.array(z.object({ type: z.string(), related: z.string() })).optional(),
      })).optional(),
    }, async ({ description, version, models }) => {
      try {
        const generator = new PlanGenerator(version);
        if (models && models.length > 0) {
          const plan = await generator.generatePlan({
            name: description,
            description,
            filamentVersion: version,
            models: models.map(m => ({
              name: m.name,
              attributes: m.attributes || [{ name: "name", type: "string", required: true }],
              relationships: m.relationships || [],
              traits: ["SoftDeletes"],
            })),
            resources: models.map(m => ({
              model: m.name,
              form: { sections: [{ title: "Details", fields: (m.attributes || []).map(a => ({ name: a.name, component: "TextInput", validation: a.required ? ["required"] : [], config: [] })) }] },
              table: { columns: (m.attributes || []).map(a => ({ name: a.name, component: "TextColumn", config: [] })) },
            })),
          });
          return { content: [{ type: "text", text: plan }] };
        }
    
        const plan = await generateQuickPlan(description, version);
        return { content: [{ type: "text", text: plan }] };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: formatErrorMessage("Plan Generation Failed", error, "Try a shorter description or provide explicit model names."),
          }],
        };
      }
    });

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