get_custom_fields
Retrieve custom field definitions for specific models like organizations, persons, or projects to access extended data fields in your business system.
Instructions
Retrieve custom field definitions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model type (organization, person, project, etc.) |
Implementation Reference
- src/mcp/server-full.ts:548-550 (handler)MCP server tool handler for 'get_custom_fields' that calls the Simplicate service method and returns JSON-formatted result.case 'get_custom_fields': { const data = await this.simplicateService.getCustomFields(toolArgs.model); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
- src/mcp/server-full.ts:362-370 (registration)Registration of the 'get_custom_fields' tool in the MCP server's listTools handler, including schema.name: 'get_custom_fields', description: 'Retrieve custom field definitions', inputSchema: { type: 'object', properties: { model: { type: 'string', description: 'Model type (organization, person, project, etc.)' }, }, }, },
- Helper method implementing the core logic for retrieving custom fields via Simplicate API.async getCustomFields(model?: string): Promise<SimplicateCustomField[]> { try { const params = model ? { model } : undefined; const response = await this.client.get('/customfields/customfield', params); return response.data || []; } catch (error) { // Custom Fields endpoint may require specific model parameter console.warn('getCustomFields: endpoint returned error, returning empty array'); return []; } }
- TypeScript interface defining the structure of custom field objects.id: string; name: string; type: string; model: string; }