detach_file
Removes a file attachment from a specified task, note, or comment in a Repsona project.
Instructions
指定したファイルをタスクやノートから添付を外します
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | プロジェクトID | |
| model | Yes | タスク、タスクコメント、ノート、ノートコメント | |
| modelId | Yes | タスクID、タスクコメントID、ノートID、ノートコメントID | |
| fileId | Yes | ファイルID |
Implementation Reference
- index.js:1357-1366 (handler)The CallToolRequestSchema handler for 'detach_file': calls this.repsonaAPI.detachFile() with projectId, model, modelId, fileId from args and returns the result.
case 'detach_file': const detachResult = await this.repsonaAPI.detachFile(args.projectId, args.model, args.modelId, args.fileId); return { content: [ { type: 'text', text: `ファイルの添付が外されました: ${JSON.stringify(detachResult, null, 2)}`, }, ], }; - index.js:734-751 (schema)Tool registration and input schema for 'detach_file': defines projectId, model (enum: task/task_comment/note/note_comment), modelId, and fileId as required parameters.
{ name: 'detach_file', description: '指定したファイルをタスクやノートから添付を外します', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'プロジェクトID' }, model: { type: 'string', enum: ['task', 'task_comment', 'note', 'note_comment'], description: 'タスク、タスクコメント、ノート、ノートコメント' }, modelId: { type: 'string', description: 'タスクID、タスクコメントID、ノートID、ノートコメントID' }, fileId: { type: 'string', description: 'ファイルID' }, }, required: ['projectId', 'model', 'modelId', 'fileId'], }, }, - index.js:734-751 (registration)The tool 'detach_file' is registered in the ListToolsRequestSchema handler alongside all other tools.
{ name: 'detach_file', description: '指定したファイルをタスクやノートから添付を外します', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'プロジェクトID' }, model: { type: 'string', enum: ['task', 'task_comment', 'note', 'note_comment'], description: 'タスク、タスクコメント、ノート、ノートコメント' }, modelId: { type: 'string', description: 'タスクID、タスクコメントID、ノートID、ノートコメントID' }, fileId: { type: 'string', description: 'ファイルID' }, }, required: ['projectId', 'model', 'modelId', 'fileId'], }, }, - index.js:274-276 (helper)The RepsonaAPI.detachFile() helper method that makes a DELETE request to /project/{projectId}/{model}/{modelId}/files/{fileId} to detach a file from a task or note.
async detachFile(projectId, model, modelId, fileId) { return this.makeRequest(`/project/${projectId}/${model}/${modelId}/files/${fileId}`, 'DELETE'); }