create_provider
Add new travel service providers to the LumbreTravel system by entering their name, description, contact details, and other required information.
Instructions
Crear un proveedor.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"description": "<description>"
},
"name": "create_provider"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del proveedor | |
| description | Yes | Descripción del proveedor | |
| No | Email del proveedor, si no tiene email se puede dejar en blanco | ||
| phone | No | Teléfono del proveedor, si no tiene teléfono se puede dejar en blanco |
Implementation Reference
- src/handlers/tools.handler.ts:1631-1637 (handler)Handler function for the 'create_provider' tool within the callTool switch statement. Extracts arguments, calls ApiService.createProvider, and returns the JSON response.
case 'create_provider': { const { name, description, phone, email } = args const provider = await this.apiService.createProvider({ name, description, phone, email }) return { content: [{ type: 'text', text: JSON.stringify(provider, null, 2) }] } } - Tool schema definition including name, description, and inputSchema for 'create_provider' in the listTools method.
name: 'create_provider', description: 'Crear un proveedor.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del proveedor' }, description: { type: 'string', description: 'Descripción del proveedor' }, email: { type: 'string', description: 'Email del proveedor, si no tiene email se puede dejar en blanco' }, phone: { type: 'string', description: 'Teléfono del proveedor, si no tiene teléfono se puede dejar en blanco' } }, required: ['name', 'description'] } }, - src/services/api.service.ts:610-623 (helper)ApiService.createProvider method that performs the HTTP POST request to the backend API to create a provider.
async createProvider (data: { name: string description: string phone: string email: string }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/provider/create`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response) } - src/index.ts:44-48 (registration)MCP server registration of the callTool handler, which dispatches to ToolsHandler.callTool based on tool name.
this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) ) } - src/index.ts:38-41 (registration)MCP server registration of the listTools handler, which provides the tool list including 'create_provider'.
this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )