Skip to main content
Glama

deleteCompany

Destructive

Remove a company and all associated data from the Teamwork MCP server by specifying the company ID.

Instructions

This tool allows you to delete a company, be careful with this tool as it will delete the company and all associated data. It requires the following parameters: companyId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesPath parameter: companyId

Implementation Reference

  • The MCP tool handler for deleteCompany, which extracts companyId from input, calls the teamworkService.deleteCompany service, and formats the response or error.
    export async function handleDeleteCompany(input: any) {
      logger.info('Calling teamworkService.deleteCompany()');
      logger.info(`Company ID: ${input?.companyId}`);
      
      try {
        const companyId = input.companyId;
        
        if (!companyId) {
          throw new Error("Company ID is required");
        }
        
        const result = await teamworkService.deleteCompany(companyId);
        logger.info(`Company deleted successfully with ID: ${companyId}`);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify({ success: result }, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Deleting company');
      }
    } 
  • The tool definition including name, description, input schema (requiring companyId), and annotations (destructiveHint: true) for deleteCompany.
    export const deleteCompanyDefinition = {
      name: "deleteCompany",
      description: "This tool allows you to delete a company, be careful with this tool as it will delete the company and all associated data. It requires the following parameters: companyId.",
      inputSchema: {
        type: 'object',
        properties: {
          companyId: {
            type: 'integer',
            description: 'Path parameter: companyId'
          }
        },
        required: [
          'companyId'
        ]
      },
      annotations: {
        title: "Delete Company",
        readOnlyHint: false,
        destructiveHint: true,
        openWorldHint: false
      }
    };
  • Registration of the deleteCompany tool in the toolPairs array, pairing its definition and handler.
    { definition: deleteCompany, handler: handleDeleteCompany },
  • The service function called by the tool handler, performing the actual API DELETE request to /companies/{companyId}.json via the api client.
    export const deleteCompany = async (companyId: number) => {
      try {
        logger.info(`Deleting company with ID ${companyId}`);
        
        const api = ensureApiClient();
        await api.delete(`companies/${companyId}.json`);
        
        logger.info(`Successfully deleted company with ID ${companyId}`);
        return true;
      } catch (error: any) {
        logger.error(`Error deleting company with ID ${companyId}: ${error.message}`);
        throw new Error(`Failed to delete company with ID ${companyId}: ${error.message}`);
      }
    };
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it warns that deletion is permanent ('delete the company and all associated data'), which reinforces the destructive nature hinted at by annotations (destructiveHint: true). It also specifies the required parameter 'companyId', though annotations already cover the non-read-only and non-open-world aspects. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: the first states the purpose and warning, and the second lists the parameter. It is front-loaded with critical information, though the parameter listing could be integrated more seamlessly, slightly reducing efficiency.

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

Completeness4/5

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

Given the tool's complexity (destructive operation with one parameter) and annotations that cover safety (destructiveHint: true), the description is mostly complete. It adds context about data deletion and parameter requirements, but lacks details on output or error handling, and there is no output schema to compensate, leaving minor gaps.

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 description mentions the required parameter 'companyId', but the input schema already provides 100% coverage with a clear description ('Path parameter: companyId'). Since schema coverage is high, the description adds minimal value beyond restating what's in the schema, meeting the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('delete a company') and resource ('company'), distinguishing it from sibling tools like 'createCompany', 'updateCompany', and 'getCompanyById'. It explicitly mentions the scope of deletion ('all associated data'), which adds important context beyond just the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context with the warning 'be careful with this tool', implying it should be used cautiously for permanent deletion. However, it does not explicitly state when to use this tool versus alternatives like 'updateCompany' or 'getCompanyById', nor does it mention prerequisites or exclusions, which prevents a perfect score.

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