Очистить бинарное поле
bpm_field_deleteDelete binary data stored in a field of an entity record. Specify the collection, record ID, and field name to remove the stored binary content.
Instructions
DELETE бинарных данных в поле сущности.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | ||
| id | Yes | ||
| field | Yes |
Implementation Reference
- src/tools/stream-tools.ts:340-383 (handler)The tool handler for bpm_field_delete. Registers the tool with Zod input schema (collection, id, field), validates the field name, calls deleteFieldBinary on the OData client, and returns a success message with structured content.
// bpm_field_delete { const meta = getTool('bpm_field_delete'); server.registerTool( meta.name, { title: meta.title, description: meta.description, inputSchema: { collection: z.string(), id: z.string(), field: z.string(), }, annotations: meta.annotations, }, async (params): Promise<CallToolResult> => { if (!services.initialized) return notInitialized(); try { await services.authManager.ensureAuthenticated(); if (!isSafeIdentifier(params.field)) { return { content: [{ type: 'text', text: `Недопустимое имя поля: "${params.field}"` }], isError: true, }; } await services.odataClient.deleteFieldBinary(params.collection, params.id, params.field); return { content: [ { type: 'text', text: `Поле ${params.collection}(${params.id}).${params.field} очищено.` }, ], structuredContent: { collection: params.collection, id: params.id, field: params.field, deleted: true, }, }; } catch (error) { const toolError = formatToolError(error, params.collection); return { content: [{ type: 'text', text: JSON.stringify(toolError, null, 2) }], isError: true }; } } ); } - src/client/odata-client.ts:287-295 (helper)The deleteFieldBinary method on ODataClient. Builds the URL as {collectionPath}/{id}/{field} and sends a DELETE request with binary content kind to the OData API.
/** DELETE binary content of an entity field. */ async deleteFieldBinary(collection: string, id: string, field: string): Promise<void> { const url = `${this.buildRecordPath(collection, id)}/${encodeURIComponent(field)}`; await this.httpClient.request({ method: 'DELETE', url, contentKind: 'binary', }); } - src/tools/registry.ts:251-258 (registration)Tool metadata registration for bpm_field_delete in the central TOOLS registry. Defines name, title, description, annotations (destructiveHint: true), blurb, and category ('stream').
{ name: 'bpm_field_delete', title: 'Очистить бинарное поле', description: 'DELETE бинарных данных в поле сущности.', annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true }, blurb: 'DELETE бинарь в поле сущности', category: 'stream', }, - src/tools/stream-tools.ts:348-353 (schema)Input schema for bpm_field_delete defined using Zod: collection (string), id (string), and field (string).
inputSchema: { collection: z.string(), id: z.string(), field: z.string(), }, annotations: meta.annotations,