delete_device_custom_field
Deletes a device custom field configuration by removing its definition from the organization. Provide the custom field ID to perform the removal.
Instructions
Delete a device custom field configuration. Removes a custom field definition from the organization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customFieldId | Yes | The ID of the custom field to delete. Make sure user wants to delete a device custom field and not an identity custom field |
Implementation Reference
- The main handler function that executes the delete_device_custom_field tool logic. It calls the Admina API DELETE /fields/custom/{customFieldId} endpoint.
export async function deleteDeviceCustomField(params: DeleteDeviceCustomFieldParams) { const client = getClient(); return client.makeDeleteApiCall(`/fields/custom/${params.customFieldId}`); } - Zod schema defining the input for delete_device_custom_field. Expects a required numeric 'customFieldId'.
export const DeleteDeviceCustomFieldSchema = z.object({ customFieldId: z .number() .describe( "The ID of the custom field to delete. Make sure user wants to delete a device custom field and not an identity custom field", ), }); - src/index.ts:154-159 (registration)Tool registration in the list of tools with name 'delete_device_custom_field', description, and inputSchema.
{ name: "delete_device_custom_field", description: "Delete a device custom field configuration. Removes a custom field definition from the organization.", inputSchema: zodToJsonSchema(DeleteDeviceCustomFieldSchema), }, - src/index.ts:306-306 (registration)Handler map entry mapping 'delete_device_custom_field' string to the imported deleteDeviceCustomField function with schema validation.
delete_device_custom_field: async (input) => deleteDeviceCustomField(DeleteDeviceCustomFieldSchema.parse(input)), - src/index.ts:20-20 (registration)Import of the schema from deleteDeviceCustomField.ts.
DeleteDeviceCustomFieldSchema,