attach_file
Attaches a file to a task, note, or comment in Repsona projects. Specify project, model type, and IDs to link files to specific items.
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:270-272 (helper)RepsonaAPI.attachFile method - Makes an API PUT request to attach a file to a model (task, task_comment, note, note_comment) in the Repsona project.
async attachFile(projectId, model, modelId, fileId) { return this.makeRequest(`/project/${projectId}/${model}/${modelId}/files/${fileId}`, 'PUT'); } - index.js:716-733 (schema)Tool schema/input definition for 'attach_file' - defines the required parameters: projectId, model (enum: task/task_comment/note/note_comment), modelId, and fileId.
{ name: 'attach_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:717-718 (registration)Registration of the 'attach_file' tool in the ListToolsRequestSchema handler - defines the tool name, description, and input schema.
name: 'attach_file', description: '指定したファイルをタスクやノートに添付します', - index.js:1346-1355 (handler)Handler for the 'attach_file' tool in the CallToolRequestSchema switch statement - calls repesonaAPI.attachFile with projectId, model, modelId, and fileId, returns a JSON result.
case 'attach_file': const attachResult = await this.repsonaAPI.attachFile(args.projectId, args.model, args.modelId, args.fileId); return { content: [ { type: 'text', text: `ファイルが添付されました: ${JSON.stringify(attachResult, null, 2)}`, }, ], };