Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_datasets

📋 List all available datasets and their status.

Returns: A formatted string listing available datasets, indicating which one is active, and showing availability of local database and BigQuery support.

set_dataset

🔄 Switch the active dataset.

Args: dataset_name: The name of the dataset to switch to (e.g., 'mimic-iv-demo').

Returns: Confirmation message with supported tools snapshot, or error if not found.

get_database_schema

📚 Discover what data is available in the database.

When to use: Start here to understand what tables exist.

Returns: List of all available tables in the database with current backend info.

get_table_info

🔍 Explore a specific table's structure and see sample data.

When to use: After identifying relevant tables from get_database_schema().

Args: table_name: Exact table name (case-sensitive). show_sample: Whether to include sample rows (default: True).

Returns: Table structure with column names, types, and sample data.

execute_query

🚀 Execute SQL queries to analyze data.

Recommended workflow:

  1. Use get_database_schema() to list tables

  2. Use get_table_info() to examine structure

  3. Write your SQL query with exact names

Args: sql_query: Your SQL SELECT query (SELECT only).

Returns: Query results or helpful error messages.

search_notes

🔍 Search clinical notes by keyword.

Returns snippets around matches to prevent context overflow. Use get_note() to retrieve full text of specific notes.

Note types: 'discharge' (summaries), 'radiology' (reports), or 'all'

Args: query: Search term to find in notes. note_type: Type of notes to search ('discharge', 'radiology', or 'all'). limit: Maximum number of results per note type (default: 5). snippet_length: Characters of context around matches (default: 300).

Returns: Matching snippets with note IDs for follow-up retrieval.

get_note

📄 Retrieve full text of a specific clinical note.

Warning: Clinical notes can be very long. Consider using search_notes() first to find relevant notes, or use max_length to truncate output.

Args: note_id: The note ID (e.g., from search_notes or list_patient_notes). max_length: Optional maximum characters to return (truncates if exceeded).

Returns: Full note text, or truncated version if max_length specified.

list_patient_notes

📋 List available clinical notes for a patient.

Returns note metadata (IDs, types, lengths) without full text. Use get_note(note_id) to retrieve specific notes.

Cross-dataset tip: Get subject_id from MIMIC-IV queries, then use it here to find related clinical notes.

Args: subject_id: Patient identifier (same as in MIMIC-IV). note_type: Type of notes to list ('discharge', 'radiology', or 'all'). limit: Maximum notes to return (default: 20).

Returns: List of available notes with metadata for the patient.

cohort_builder

Launch the interactive cohort builder.

Opens a visual interface for filtering patients by demographics and clinical criteria. See live patient counts as you adjust filters.

Requires: A host that supports MCP Apps (like Claude Desktop). For non-UI hosts, returns dataset information as text.

Returns: Dataset info and welcome message. UI hosts will render the interactive cohort builder interface.

query_cohort

Query cohort counts based on filtering criteria.

Used by the cohort builder UI for live updates as users adjust filters. Can also be called directly to get cohort statistics.

Args: age_min: Minimum patient age (0-130, inclusive). age_max: Maximum patient age (0-130, inclusive). gender: Patient gender ('M' or 'F'). icd_codes: List of ICD diagnosis code prefixes to filter by. icd_match_all: If True, patient must have ALL ICD codes (AND); default is ANY (OR). has_icu_stay: If True, require ICU stay; if False, exclude ICU patients. in_hospital_mortality: If True, require in-hospital death; if False, exclude deaths.

Returns: JSON with patient_count, admission_count, demographics, and SQL.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
cohort_builder_uiServe the cohort builder UI HTML bundle.

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/hannesill/m4'

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