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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/handlers/tool-handlers.ts:306-332 (handler)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), }, ], }; } }
- src/definitions/tools.ts:104-112 (schema)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: [], }, },
- src/mcp-server.ts:194-195 (registration)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);