Skip to main content
Glama

list_departments

Retrieve all departments within your medical practice to organize workflows and manage patient care across different clinical areas.

Instructions

List all departments in the practice

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • Implements the list_departments tool by fetching departments from AthenaHealthClient and returning JSON response or error.
    async handleListDepartments(args: any) { try { const departments = await this.client.getDepartments(); return { content: [ { type: 'text' as const, text: JSON.stringify(departments, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text' as const, text: JSON.stringify({ error: 'Failed to list departments', message: error.message || 'Unknown error occurred', details: error.details || error.message, }, null, 2), }, ], }; } }
  • Defines the tool schema with name, description, and empty input schema (no parameters required).
    { name: 'list_departments', description: 'List all departments in the practice', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • Registers and dispatches the list_departments tool call to the handler in the MCP server switch statement.
    case 'list_departments': return await this.toolHandlers.handleListDepartments(args);

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