Skip to main content
Glama

detach_file

Removes a file attachment from a specified task, note, or comment in a Repsona project.

Instructions

指定したファイルをタスクやノートから添付を外します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesプロジェクトID
modelYesタスク、タスクコメント、ノート、ノートコメント
modelIdYesタスクID、タスクコメントID、ノートID、ノートコメントID
fileIdYesファイルID

Implementation Reference

  • 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)}`,
          },
        ],
      };
  • 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'],
      },
    },
  • 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');
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only states the action. It does not disclose side effects (e.g., file remains accessible), required permissions, or error conditions, leaving the agent uninformed about behavior beyond the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no superfluous words. It is front-loaded with the core action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While parameters are well-documented in the schema, the description lacks information about return values or success criteria. Since there is no output schema, the agent may not know what to expect after invocation. The tool is moderately complex with four required params, but the description does not fully compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already defines each parameter. The description adds no additional meaning or constraints, meeting the baseline but not exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'detach' and the resource 'file from tasks or notes'. It distinguishes itself from sibling tools like 'attach_file' and 'delete_file' by specifying the detach action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no context on when to use this tool versus alternatives. There is no mention of prerequisites, post-conditions, or when to prefer detaching over deleting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bellx2/repsona-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server