update_service
Modify and update service details such as name, description, and provider information to ensure accurate management of travel programs and activities on LumbreTravel MCP Server.
Instructions
Actualizar un servicio
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Descripción del servicio | |
| id | Yes | ID del servicio a actualizar | |
| name | Yes | Nombre del servicio | |
| provider | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1519-1525 (handler)The execution handler for the 'update_service' tool within the callTool switch statement. It destructures the arguments and calls the ApiService.updateService method, returning the result as MCP content.case 'update_service': { const { id, name, description, provider } = args const service = await this.apiService.updateService({ id, name, description, provider }) return { content: [{ type: 'text', text: JSON.stringify(service, null, 2) }] } }
- The input schema and metadata definition for the 'update_service' tool, registered in the listTools() method.{ name: 'update_service', description: 'Actualizar un servicio', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del servicio a actualizar' }, name: { type: 'string', description: 'Nombre del servicio' }, description: { type: 'string', description: 'Descripción del servicio' }, provider: { type: 'object', properties: { id: { type: 'string', description: 'ID del proveedor' }, name: { type: 'string', description: 'Nombre del proveedor' } } } }, required: ['id', 'name', 'description', 'provider'] } },
- src/services/api.service.ts:687-703 (helper)The supporting API service method that performs the actual HTTP PUT request to update a service via the LumbreTravel API.async updateService (data: { id: string name: string description: string provider: { id: string name: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/service/update`, { method: 'PUT', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response) }
- src/index.ts:38-47 (registration)Generic registration of tool handlers to the MCP server: listTools for tool schemas and callTool for execution of any tool including 'update_service'.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() ) // Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )