update_organization
Modify organization details in Simplicate by providing the organization ID and updated data fields to maintain current business information.
Instructions
Update an organization
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| organization_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"data": {
"type": "object"
},
"organization_id": {
"type": "string"
}
},
"required": [
"organization_id",
"data"
],
"type": "object"
}
Implementation Reference
- src/mcp/server-full.ts:158-169 (registration)Tool registration including name, description, and input schema definition for update_organization{ name: 'update_organization', description: 'Update an organization', inputSchema: { type: 'object', properties: { organization_id: { type: 'string' }, data: { type: 'object' }, }, required: ['organization_id', 'data'], }, },
- src/mcp/server-full.ts:450-453 (handler)MCP CallToolRequest handler switch case that validates input and delegates to SimplicateServiceExtended.updateOrganizationcase 'update_organization': { if (!toolArgs.organization_id || !toolArgs.data) throw new Error('organization_id and data required'); const data = await this.simplicateService.updateOrganization(toolArgs.organization_id, toolArgs.data); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
- TypeScript interface defining the SimplicateOrganization data structure used for update operationsexport interface SimplicateOrganization { id: string; name: string; coc_code?: string; email?: string; phone?: string; website?: string; relation_type?: string; address?: any; }
- Core service method implementing the organization update via PUT request to Simplicate APIasync updateOrganization(organizationId: string, data: Partial<SimplicateOrganization>): Promise<SimplicateOrganization> { const response = await this.client.put(`/crm/organization/${organizationId}`, data); return response.data; }