er_record_create
Generate a new Edge Routine (ER) record by specifying the routine name, site ID, and record name, enabling effective management of AI model integrations via the ESA MCP Server.
Instructions
Create a new record associated with an Edge Routine (ER)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the routine | |
| recordName | Yes | The name of the record | |
| siteId | Yes | The ID of the site |
Implementation Reference
- src/tools/er/record.ts:87-96 (handler)The main handler function for the 'er_record_create' tool. It calls the API to create a routine-related record and returns the result as JSON.export const er_record_create = async (request: CallToolRequest) => { const res = await api.createRoutineRelatedRecord( request.params.arguments as CreateRoutineRelatedRecordRequest, ); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
- src/tools/er/record.ts:9-30 (schema)The tool definition object providing the name, description, and input schema for 'er_record_create'.export const ER_RECORD_CREATE_TOOL: Tool = { name: 'er_record_create', description: 'Create a new record associated with an Edge Routine (ER)', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'The name of the routine', }, siteId: { type: 'number', description: 'The ID of the site', }, recordName: { type: 'string', description: 'The name of the record', }, }, required: ['name', 'siteId', 'recordName'], }, };
- src/tools/list-esa-function.ts:181-181 (registration)Registration of the er_record_create handler in the esaHandlers object used for tool dispatching.er_record_create,
- src/tools/list-esa-function.ts:120-120 (registration)Inclusion of the ER_RECORD_CREATE_TOOL schema in the ESA_OPENAPI_ER_LIST array for tool listing and discovery.ER_RECORD_CREATE_TOOL,
- src/tools/list-esa-function.ts:2-3 (registration)Import of the er_record_create handler and ER_RECORD_CREATE_TOOL from './er/record'.er_record_create, ER_RECORD_CREATE_TOOL,