M4
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| 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
| Name | Description |
|---|---|
| capabilitiesA | Return the M4 capability manifest as JSON. |
| list_datasetsA | 📋 List all available datasets and their status. Returns: A formatted string listing available datasets, indicating selected status, and showing availability of local database and BigQuery support. |
| set_datasetD | Deprecated: M4 no longer keeps a global active dataset. |
| get_database_schemaA | 📚 Discover what data is available in the database. When to use: Start here to understand what tables exist. Args: dataset: Dataset name, e.g. 'mimic-iv'. Returns: List of all available tables in the database with current backend info. |
| get_table_infoA | 🔍 Explore a specific table's structure and see sample data. When to use: After identifying relevant tables from get_database_schema(). Args: dataset: Dataset name, e.g. 'mimic-iv'. 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_queryA | 🚀 Execute SQL queries to analyze data. Recommended workflow:
Args: dataset: Dataset name, e.g. 'mimic-iv'. sql_query: Your SQL SELECT query (SELECT only). Returns: Query results or helpful error messages. |
| search_notesA | 🔍 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: dataset: Dataset name, e.g. 'mimic-iv-note'. 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_noteA | 📄 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: dataset: Dataset name, e.g. 'mimic-iv-note'. 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_notesA | 📋 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: dataset: Dataset name, e.g. 'mimic-iv-note'. 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_builderA | 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_cohortA | 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: dataset: Dataset name, e.g. 'mimic-iv'. 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| capabilities_resource | Return the M4 capability manifest as JSON. |
| cohort_builder_ui | Serve the cohort builder UI HTML bundle. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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