Skip to main content
Glama

get_encounter

Retrieve detailed clinical encounter information from athenahealth's electronic health records to support patient care decisions and documentation.

Instructions

Get details of a specific encounter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encounter_idYesEncounter ID

Implementation Reference

  • Tool schema definition including name, description, and input validation schema requiring 'encounter_id'.
    {
      name: 'get_encounter',
      description: 'Get details of a specific encounter',
      inputSchema: {
        type: 'object',
        properties: {
          encounter_id: { type: 'string', description: 'Encounter ID' },
        },
        required: ['encounter_id'],
      },
    },
  • Executes the get_encounter tool: parses input, fetches encounter via client, logs audit, returns JSON response or error.
    async handleGetEncounter(args: any) {
      try {
        const { encounter_id } = args;
        const encounter = await this.client.getEncounter(encounter_id);
    
        auditLog('ENCOUNTER_ACCESS', {
          resourceId: encounter_id,
          result: 'success',
          resourceType: 'ENCOUNTER',
        });
    
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify(encounter, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify({
                error: 'Failed to get encounter',
                message: error.message || 'Unknown error occurred',
                status: error.status || null,
                note: 'Encounter endpoints may not be available in the athenahealth preview/sandbox environment.',
              }, null, 2),
            },
          ],
        };
      }
    }
  • Dispatches get_encounter tool calls to the handler in the MCP server's tool execution switch statement.
    case 'get_encounter':
      return await this.toolHandlers.handleGetEncounter(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets details' but doesn't specify whether this is a read-only operation, what permissions are required, error handling, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste. It's appropriately sized for a simple retrieval tool and front-loads the essential action. Every word earns its place without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that likely returns detailed encounter data. It doesn't explain what 'details' include, potential errors, or response structure. For a healthcare context with siblings like 'get_clinical_summary', more context is needed to distinguish functionality.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'encounter_id' parameter. The description adds no additional meaning beyond what the schema provides—it doesn't clarify format, source, or constraints for the ID. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'details of a specific encounter', making the purpose unambiguous. It distinguishes from siblings like 'get_patient_encounters' (which lists multiple encounters) by specifying retrieval of a single encounter. However, it doesn't explicitly mention what details are included, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an encounter ID), exclusions, or comparisons to siblings like 'get_clinical_summary' or 'get_patient_encounters'. The agent must infer usage from the name and context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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