create_agency
Create and register a new travel agency within the LumbreTravel MCP Server by providing the agency name, description, and provider details. Ensures agency uniqueness verification before creation.
Instructions
Crear una agencia. Antes de crear una nueva agencia se debe preguntar al si quiere que primero se busque la agencia a ver si existe
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Descripción de la agencia | |
| name | Yes | Nombre de la agencia | |
| provider | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1431-1437 (handler)MCP tool handler for 'create_agency': destructures input args and invokes the ApiService.createAgency helper, serializing and returning the result as text content.case 'create_agency': { const { name, description, provider } = args const agency = await this.apiService.createAgency({ name, description, provider }) return { content: [{ type: 'text', text: JSON.stringify(agency, null, 2) }] } }
- Tool metadata and input schema definition for 'create_agency', registered in listTools().name: 'create_agency', description: 'Crear una agencia. Antes de crear una nueva agencia se debe preguntar al si quiere que primero se busque la agencia a ver si existe', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre de la agencia' }, description: { type: 'string', description: 'Descripción de la agencia' }, provider: { type: 'object', properties: { id: { type: 'string', description: 'ID del proveedor de la agencia.' }, name: { type: 'string', description: 'Nombre del proveedor de la agencia' } } } }, required: ['name', 'description', 'provider'] } },
- src/services/api.service.ts:428-443 (helper)ApiService helper method invoked by the tool handler; sends POST request to backend /integrations/mcp/agency/create endpoint with auth headers.async createAgency (data: { name: string description: string provider: { id: string name: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/agency/create`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response) }