Skip to main content
Glama

list_providers

Find healthcare providers in your practice by name or specialty to support clinical workflows and patient care coordination.

Instructions

List all healthcare providers in the practice

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results
nameNoFilter by provider name
specialtyNoFilter by specialty

Implementation Reference

  • The MCP tool handler function that executes the list_providers tool. It calls the AthenaHealthClient.getProviders method with the input arguments and returns the formatted JSON response or error message.
    async handleListProviders(args: any) { try { const providers = await this.client.getProviders(args); return { content: [ { type: 'text' as const, text: JSON.stringify(providers, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text' as const, text: JSON.stringify({ error: 'Failed to list providers', message: error.message || 'Unknown error occurred', details: error.details || error.message, }, null, 2), }, ], }; } }
  • The input schema definition for the list_providers tool, specifying optional parameters like limit, name, and specialty.
    name: 'list_providers', description: 'List all healthcare providers in the practice', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of results', default: 50 }, name: { type: 'string', description: 'Filter by provider name' }, specialty: { type: 'string', description: 'Filter by specialty' }, }, required: [], }, },
  • Tool call registration in the MCP server that routes 'list_providers' calls to the ToolHandlers.handleListProviders method.
    case 'list_providers': return await this.toolHandlers.handleListProviders(args);
  • Core helper function in SchedulingService that performs the actual HTTP GET request to the Athenahealth API /providers endpoint, handles various response formats, and returns the list of providers.
    async getProviders(params?: { limit?: number; offset?: number; name?: string; specialty?: string; }): Promise<Provider[]> { try { const response = await this.makeRequest<any>( `${this.config.practice_id}/providers`, { method: 'GET', params, } ); console.error('Providers response:', JSON.stringify(response, null, 2)); if (response.providers && Array.isArray(response.providers)) { return response.providers; } if (Array.isArray(response)) { return response; } if (response.data && Array.isArray(response.data)) { return response.data; } console.error('Unexpected providers response structure, returning empty array'); return []; } catch (error: any) { console.error('Get providers error:', error.message); throw error; } }

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/ophydami/Athenahealth-MCP'

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