update_collection_response
Update response fields (name, code, status) in a collection by providing only the values to change.
Instructions
Update a response in a collection. Acts like PATCH, only updates provided values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Collection ID | |
| response_id | Yes | Response ID | |
| response | Yes | Response details to update |
Implementation Reference
- Main handler function for 'update_collection_response'. Sends a PUT request to /collections/{collection_id}/responses/{response_id} with the response data to update.
async updateCollectionResponse(args: any): Promise<ToolCallResponse> { const response = await this.client.put( `/collections/${args.collection_id}/responses/${args.response_id}`, args.response ); return this.createResponse(response.data); } - Input schema definition for 'update_collection_response' tool. Defines required fields: collection_id, response_id, and response (object with optional name, code, status).
{ name: 'update_collection_response', description: 'Update a response in a collection. Acts like PATCH, only updates provided values.', inputSchema: { type: 'object', properties: { collection_id: { type: 'string', description: 'Collection ID', }, response_id: { type: 'string', description: 'Response ID', }, response: { type: 'object', description: 'Response details to update', properties: { name: { type: 'string' }, code: { type: 'number' }, status: { type: 'string' } } } }, required: ['collection_id', 'response_id', 'response'], }, }, - src/tools/api/collections/index.ts:65-66 (registration)Registration/case-mapping of the tool name 'update_collection_response' to the handler method updateCollectionResponse() inside the handleToolCall dispatcher.
case 'update_collection_response': return await this.updateCollectionResponse(args); - Helper createResponse() method used by updateCollectionResponse to wrap API response data into a ToolCallResponse format.
private createResponse(data: any): ToolCallResponse { return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }