Skip to main content
Glama

Teamwork MCP

deleteCompany.ts1.59 kB
/** * deleteCompany tool * Deletes a company from Teamwork */ import logger from "../../utils/logger.js"; import teamworkService from "../../services/index.js"; // Tool definition 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 } }; // Tool handler 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) { logger.error(`Error in deleteCompany handler: ${error.message}`); return { content: [{ type: "text", text: `Error deleting company: ${error.message}` }] }; } }

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