Skip to main content
Glama

siigo_get_cities

Retrieve the complete catalog of Colombian cities available in the Siigo accounting system for accurate location data in financial documents and client records.

Instructions

Get cities catalog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler function that executes the tool logic by calling SiigoClient.getCities() and formatting the response as MCP content.
    private async handleGetCities(args: any) { const result = await this.siigoClient.getCities(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Core tool implementation in SiigoClient: performs authenticated GET request to Siigo API endpoint '/v1/cities'.
    async getCities(): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/cities'); }
  • src/index.ts:717-721 (registration)
    Tool registration in getTools() method, including name, description, and input schema (no parameters required).
    { name: 'siigo_get_cities', description: 'Get cities catalog', inputSchema: { type: 'object', properties: {} }, },
  • Dispatch case in the main CallToolRequestSchema handler switch statement that routes the tool call to handleGetCities.
    case 'siigo_get_cities': return await this.handleGetCities(args);
  • Shared helper method used by getCities() to handle authentication, make Axios request to Siigo API, and process response or error.
    private async makeRequest<T>(method: string, endpoint: string, data?: any, params?: any): Promise<SiigoApiResponse<T>> { await this.authenticate(); try { const response: AxiosResponse<SiigoApiResponse<T>> = await this.httpClient.request({ method, url: endpoint, data, params, }); return response.data; } catch (error: any) { if (error.response?.data) { return error.response.data; } throw new Error(`API request failed: ${error.message}`); } }

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/jdlar1/siigo-mcp'

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