create_contract
Generate new contracts in Simplicate by specifying organization details and contract dates to establish business agreements.
Instructions
Create a new contract
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | ||
| organization_id | Yes | ||
| start_date | Yes |
Implementation Reference
- src/mcp/server-full.ts:344-356 (registration)Tool registration including name, description, and input schema for 'create_contract' in the ListTools handler.{ name: 'create_contract', description: 'Create a new contract', inputSchema: { type: 'object', properties: { organization_id: { type: 'string' }, start_date: { type: 'string' }, end_date: { type: 'string' }, }, required: ['organization_id', 'start_date'], }, },
- src/mcp/server-full.ts:542-545 (handler)MCP tool handler for 'create_contract' that delegates to SimplicateServiceExtended.createContract and formats response.case 'create_contract': { const data = await this.simplicateService.createContract(toolArgs); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
- Core implementation of createContract method that performs HTTP POST to Simplicate API endpoint '/crm/contract'.async createContract(data: Partial<SimplicateContract>): Promise<SimplicateContract> { const response = await this.client.post('/crm/contract', data); return response.data; }
- TypeScript interface defining the SimplicateContract data structure used by createContract.export interface SimplicateContract { id: string; contract_number: string; organization?: { id: string; name: string }; start_date: string; end_date?: string; status: string; }