create_project
Create new web projects on AICre8 platform with customizable visibility settings (Public, Private, or Link access). Returns project ID and URL for immediate use.
Instructions
Create a new AICre8 project. Returns the project ID and URL ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Project name (default: "API Project") | |
| access_type | No | Visibility: Public (gallery), Private (owner only), Link (anyone with URL) |
Implementation Reference
- src/index.ts:66-83 (handler)The MCP tool handler for 'create_project' that receives params, calls client.createProject(), and returns the result as JSON text content with error handling.
async (params) => { try { const result = await client.createProject({ name: params.name, access_type: params.access_type, }); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2), }, ], }; } catch (err: any) { return { content: [{ type: 'text' as const, text: `Error: ${err.message}` }], isError: true }; } }, - src/client.ts:59-71 (helper)The createProject() method in AICre8Client that makes a POST request to '/projects' endpoint and returns the created project details (id, url_id, name, created_at, preview_url, access_type).
async createProject(params: { name?: string; access_type?: 'Public' | 'Private' | 'Link'; }): Promise<{ id: string; url_id: string; name: string; created_at: string; preview_url: string | null; access_type: string; }> { return this.request('POST', '/projects', params); } - src/index.ts:59-65 (schema)Zod schema definition for create_project tool input: 'name' (optional string) and 'access_type' (optional enum: Public, Private, Link).
{ name: z.string().optional().describe('Project name (default: "API Project")'), access_type: z .enum(['Public', 'Private', 'Link']) .optional() .describe('Visibility: Public (gallery), Private (owner only), Link (anyone with URL)'), }, - src/index.ts:54-84 (registration)Registration of 'create_project' tool using server.tool() with name, description, Zod input schema, and async handler function.
// ── Tool: create_project ── server.tool( 'create_project', 'Create a new AICre8 project. Returns the project ID and URL ID.', { name: z.string().optional().describe('Project name (default: "API Project")'), access_type: z .enum(['Public', 'Private', 'Link']) .optional() .describe('Visibility: Public (gallery), Private (owner only), Link (anyone with URL)'), }, async (params) => { try { const result = await client.createProject({ name: params.name, access_type: params.access_type, }); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2), }, ], }; } catch (err: any) { return { content: [{ type: 'text' as const, text: `Error: ${err.message}` }], isError: true }; } }, );