delete_record
Remove a DNS record from your website by specifying its RecordId to manage domain configurations and maintain accurate DNS settings.
Instructions
Deletes a DNS record of a website based on the specified RecordId.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | The record ID, which can be obtained by calling ListRecords . |
Implementation Reference
- src/tools/site/record.ts:741-750 (handler)The handler function that implements the core logic of the 'delete_record' tool by extracting parameters, calling the API service's deleteRecord method, and returning the response.export const delete_record = async (request: CallToolRequest) => { const req = request.params.arguments as DeleteRecordRequest; const res = await api.deleteRecord(req); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
- src/tools/site/record.ts:520-539 (schema)The tool definition for 'delete_record' including its input JSON schema for validation.export const DELETE_RECORD_TOOL: Tool = { name: 'delete_record', description: 'Deletes a DNS record of a website based on the specified RecordId.', inputSchema: { type: 'object', properties: { recordId: { type: 'number', description: 'The record ID, which can be obtained by calling ListRecords .', examples: [1234567890123], }, }, required: ['recordId'], annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, }, }, };
- src/tools/list-esa-function.ts:157-163 (registration)Registration of the 'delete_record' tool as part of the ESA_OPENAPI_LIST via inclusion in ESA_OPENAPI_SITE_LIST.export const ESA_OPENAPI_LIST = [ ...ESA_OPENAPI_ER_LIST, ...ESA_OPENAPI_SITE_LIST, ...IPV6_LIST, ...CERTIFICATE_LIST, ...MANAGED_TRANSFORM_LIST, ];
- src/utils/service.ts:433-442 (helper)Helper method in the API service that wraps the Alibaba Cloud ESA client's deleteRecord call, used by the tool handler.deleteRecord(params: DeleteRecordRequest) { const request = new DeleteRecordRequest(params); return this.callApi( this.client.deleteRecord.bind(this.client) as ApiMethod< DeleteRecordRequest, DeleteRecordResponse >, request, ); }
- src/tools/list-esa-function.ts:196-196 (registration)Mapping of the 'delete_record' handler function in the esaHandlers object for tool dispatching.delete_record,