Skip to main content
Glama

createProject

Create a new project in Teamwork by specifying its name, description, company, category, dates, and status to organize work and track progress.

Instructions

Create a new project in Teamwork

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the project (required)
descriptionNoThe description of the project
companyIdNoThe ID of the company the project belongs to
categoryIdNoThe ID of the category the project belongs to
startDateNoThe start date of the project (format: YYYYMMDD)
endDateNoThe end date of the project (format: YYYYMMDD)
statusNoThe status of the project

Implementation Reference

  • The MCP tool handler function for createProject. It processes the input, maps it to CreateProjectData, calls the teamworkService.createProject, and formats the response.
    export async function handleCreateProject(input: any) {
      logger.info('Calling teamworkService.createProject()');
      logger.info(`Project name: ${input?.name}`);
    
      try {
        if (!input?.name) {
          throw new Error("Project name is required");
        }
        
        // Prepare project data
        const projectData: CreateProjectData = {
          name: input.name
        };
          
        // Add optional fields if provided
        if (input.description) projectData.description = input.description;
        if (input.companyId) projectData.companyId = input.companyId;
        if (input.categoryId) projectData.categoryId = input.categoryId;
        if (input.startDate) projectData.startDate = input.startDate;
        if (input.endDate) projectData.endDate = input.endDate;
        if (input.status) projectData.status = input.status;
        
        // Add any other properties that might be in the input
        Object.keys(input).forEach(key => {
          if (!['name', 'description', 'companyId', 'categoryId', 'startDate', 'endDate', 'status'].includes(key)) {
            projectData[key] = input[key];
          }
        });
        
        // Call the service to create the project
        const result = await teamworkService.createProject(projectData);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(result, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Creating project');
      }
    } 
  • The tool definition object including name, description, inputSchema for validation, and annotations.
    export const createProjectDefinition = {
      name: "createProject",
      description: "Create a new project in Teamwork",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "The name of the project (required)"
          },
          description: {
            type: "string",
            description: "The description of the project"
          },
          companyId: {
            type: "integer",
            description: "The ID of the company the project belongs to"
          },
          categoryId: {
            type: "integer",
            description: "The ID of the category the project belongs to"
          },
          startDate: {
            type: "string",
            description: "The start date of the project (format: YYYYMMDD)"
          },
          endDate: {
            type: "string",
            description: "The end date of the project (format: YYYYMMDD)"
          },
          status: {
            type: "string",
            description: "The status of the project"
          }
        },
        required: ["name"]
      },
      annotations: {
        title: "Create a Project",
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: false
      }
    };
  • Registration of the createProject tool in the toolPairs array, which populates toolDefinitions and toolHandlersMap for MCP.
    { definition: createProject, handler: handleCreateProject },
  • The service helper function that performs the actual API call to Teamwork to create a project using v1 endpoint.
    export const createProject = async (projectData: CreateProjectData) => {
      try {
        logger.info('Creating new project in Teamwork');
        
        if (!projectData.name) {
          throw new Error('Project name is required');
        }
        
        // The v1 API endpoint for creating projects is /projects.json
        const api = getApiClientForVersion('v1');
        
        // The API expects the project data to be wrapped in a 'project' object
        const requestData = {
          project: projectData
        };
        
        logger.info(`Creating project with name: ${projectData.name}`);
        
        const response = await api.post('/projects.json', requestData);
        
        logger.info(`Successfully created project: ${projectData.name}`);
        logger.info(`Project ID: ${response.data?.id || 'Unknown'}`);
        
        return response.data;
      } catch (error: any) {
        logger.error(`Failed to create project: ${error.message}`);
        throw new Error(`Failed to create project: ${error.message}`);
      }
    };
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is a write operation (readOnlyHint: false) and non-destructive (destructiveHint: false). The description adds the basic behavioral context that it creates something new, but doesn't provide additional behavioral details like what permissions are required, whether there are rate limits, what happens on duplicate names, or what the response contains. With annotations covering the safety profile, this earns a baseline score.

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 states the core purpose without any wasted words. It's appropriately sized for a creation tool and front-loads the essential information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with good schema coverage (100%) and annotations indicating it's a write operation, the description provides the basic purpose but lacks important context. There's no output schema, so the description doesn't explain what gets returned (e.g., project ID, confirmation). It also doesn't address prerequisites, error conditions, or how this tool relates to other project management operations in the system.

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?

Schema description coverage is 100%, with all 7 parameters well-documented in the schema itself. The description adds no parameter information beyond what's already in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 a new project') and resource ('in Teamwork'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other creation tools like createCompany or createTask, which would require specifying what makes a project distinct from those other entities.

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. With sibling tools like createCompany and createTask available, there's no indication of when a project is the appropriate entity to create versus a company or task, nor any prerequisites or contextual constraints mentioned.

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/Vizioz/Teamwork-MCP'

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