Skip to main content
Glama
by bbernstein

create_project

Initiate a new lighting project by specifying a name and description to organize and manage theatrical lighting design workflows on the LacyLights MCP Server.

Instructions

Create a new lighting project

Input Schema

NameRequiredDescriptionDefault
descriptionNoProject description
nameYesProject name

Input Schema (JSON Schema)

{ "properties": { "description": { "description": "Project description", "type": "string" }, "name": { "description": "Project name", "type": "string" } }, "required": [ "name" ], "type": "object" }

Implementation Reference

  • The core handler function for the 'create_project' tool. Parses input using Zod schema, calls GraphQL client to create project, returns formatted response with project details and success message, handles errors.
    async createProject(args: z.infer<typeof CreateProjectSchema>) { const { name, description} = CreateProjectSchema.parse(args); try { const project = await this.graphqlClient.createProject({ name, description }); return { project: { id: project.id, name: project.name, description: project.description, createdAt: project.createdAt }, message: `Successfully created project "${name}"` }; } catch (error) { throw new Error(`Failed to create project: ${error}`); } }
  • Zod input schema used for validating arguments in the createProject handler.
    const CreateProjectSchema = z.object({ name: z.string().describe('Project name'), description: z.string().optional().describe('Project description') });
  • src/index.ts:97-113 (registration)
    Tool metadata registration (name, description, inputSchema) returned by ListToolsRequestHandler.
    name: "create_project", description: "Create a new lighting project", inputSchema: { type: "object", properties: { name: { type: "string", description: "Project name", }, description: { type: "string", description: "Project description", }, }, required: ["name"], }, },
  • src/index.ts:1804-1816 (registration)
    Dispatch handler in CallToolRequestSchema switch statement that invokes the createProject method.
    case "create_project": return { content: [ { type: "text", text: JSON.stringify( await this.projectTools.createProject(args as any), null, 2, ), }, ], };
  • GraphQL client helper method that executes the createProject mutation and returns the new project data.
    async createProject(input: { name: string; description?: string; }): Promise<Project> { const mutation = ` mutation CreateProject($input: CreateProjectInput!) { createProject(input: $input) { id name description createdAt updatedAt } } `; const data = await this.query(mutation, { input }); return data.createProject;

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/bbernstein/lacylights-mcp'

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