Skip to main content
Glama

webforge_create_project

Create a new website project by specifying business type, name, and optional design elements like style and color palette for local businesses.

Instructions

Create a new website project in WebForge

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesProject name
business_typeYesType of business
descriptionNoOptional project description
style_idNoOptional style ID to assign
palette_idNoOptional palette ID to assign
domainNoOptional custom domain

Implementation Reference

  • Core implementation of createProject function that validates input, checks style/palette existence, inserts the project into the database, and returns the created project.
    export async function createProject(projectData: CreateProjectRequest): Promise<Project> {
      try {
        if (!projectData.name || !projectData.business_type) {
          throw new Error('Project name and business type are required');
        }
    
        const client = supabase.getAnonClient();
        
        // Validate style_id if provided
        if (projectData.style_id) {
          const { data: styleExists, error: styleError } = await client
            .from('design_styles')
            .select('id')
            .eq('id', projectData.style_id)
            .single();
            
          if (styleError || !styleExists) {
            throw new Error(`Style with ID '${projectData.style_id}' not found`);
          }
        }
    
        // Validate palette_id if provided
        if (projectData.palette_id) {
          const { data: paletteExists, error: paletteError } = await client
            .from('design_palettes')
            .select('id')
            .eq('id', projectData.palette_id)
            .single();
            
          if (paletteError || !paletteExists) {
            throw new Error(`Palette with ID '${projectData.palette_id}' not found`);
          }
        }
    
        const newProject = {
          name: projectData.name,
          business_type: projectData.business_type,
          description: projectData.description || null,
          style_id: projectData.style_id || null,
          palette_id: projectData.palette_id || null,
          domain: projectData.domain || null,
          status: 'draft' as const,
          // user_id will be set by RLS if authentication is properly configured
        };
    
        const { data, error } = await client
          .from('projects')
          .insert(newProject)
          .select()
          .single();
    
        if (error) {
          supabase.log(`Error creating project: ${error.message}`, 'error');
          throw new Error(`Failed to create project: ${error.message}`);
        }
    
        if (!data) {
          throw new Error('Failed to create project: No data returned');
        }
    
        supabase.log(`Created project: ${data.name} (${data.id})`);
    
        return data as Project;
    
      } catch (error) {
        supabase.log(`Error in createProject: ${error}`, 'error');
        throw error;
      }
    }
  • src/index.ts:103-137 (registration)
    Tool registration with input schema definition for webforge_create_project in the ListToolsRequestSchema handler.
    {
      name: 'webforge_create_project',
      description: 'Create a new website project in WebForge',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Project name',
          },
          business_type: {
            type: 'string',
            description: 'Type of business',
          },
          description: {
            type: 'string',
            description: 'Optional project description',
          },
          style_id: {
            type: 'string',
            description: 'Optional style ID to assign',
          },
          palette_id: {
            type: 'string',
            description: 'Optional palette ID to assign',
          },
          domain: {
            type: 'string',
            description: 'Optional custom domain',
          },
        },
        required: ['name', 'business_type'],
        additionalProperties: false,
      },
    },
  • MCP tool handler that receives tool calls, validates arguments, and delegates to createProject function.
    case 'webforge_create_project': {
      const projectData = args as {
        name: string;
        business_type: string;
        description?: string;
        style_id?: string;
        palette_id?: string;
        domain?: string;
      };
      const result = await createProject(projectData);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the input type for createProject function.
    export interface CreateProjectRequest {
      name: string;
      business_type: string;
      description?: string;
      style_id?: string;
      palette_id?: string;
      domain?: string;
    }
  • TypeScript interface defining the Project type returned by createProject function.
    export interface Project {
      id?: string;
      user_id?: string;
      name: string;
      business_type: string;
      description?: string;
      style_id?: string;
      palette_id?: string;
      domain?: string;
      status: 'draft' | 'published' | 'archived';
      created_at?: string;
      updated_at?: string;
    }
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. While 'Create' implies a write operation, it doesn't mention permissions required, whether the operation is idempotent, rate limits, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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 that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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?

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what a 'website project' entails, what happens after creation, or any behavioral nuances. Given the complexity of creating a resource with 6 parameters, more context is needed for effective use.

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 schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond implying that 'name' and 'business_type' are required (which is already clear from the schema). This meets the baseline for high schema coverage.

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 ('Create') and resource ('new website project in WebForge'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'webforge_update_project' or explain what distinguishes creation from updating, which prevents 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?

The description provides no guidance on when to use this tool versus alternatives like 'webforge_update_project' or 'webforge_list_projects'. It lacks any context about prerequisites, typical scenarios, or exclusions, leaving the agent with minimal 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/joytorm/webforge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server