Skip to main content
Glama

openemr_drug_safety_flag_create

Create drug safety flags in patient records to document adverse events, recalls, warnings, contraindications, or custom safety notes for clinical risk management.

Instructions

Create a drug safety flag for a patient (adverse event, recall, warning, contraindication, or custom note).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patient_idYesOpenEMR patient ID
drug_nameYesName of the drug being flagged
descriptionYesClinical description of the safety concern
flag_typeNoadverse_event
severityNoMODERATE
sourceNoAGENT
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. While it identifies the operation as a creation ('Create'), it fails to disclose critical behavioral traits: whether the operation is idempotent, what error occurs if the patient_id is invalid, required permissions/clinical authority, or whether the created flag triggers notifications to providers.

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, efficiently structured sentence with the action verb front-loaded. Every clause earns its place: the core operation is stated immediately, and the parenthetical list clarifies the flag taxonomy without verbosity. No redundant or filler text is present.

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 the clinical complexity (6 parameters including severity/source enums), lack of annotations, and no output schema, the description is insufficient. It omits the default values for optional fields ('flag_type' defaults to 'adverse_event', 'severity' to 'MODERATE'), does not mention the 3 required vs. 3 optional parameters, and provides no indication of return values or success/failure behaviors expected from a write operation.

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 50% (3 of 6 parameters described). The description compensates partially by enumerating the flag_type options in natural language ('adverse event, recall...'), adding semantic context beyond the enum keys. However, it completely omits guidance on the 'severity' (HIGH/MODERATE/LOW) and 'source' (FDA_FAERS, CLINICIAN, etc.) enums, leaving half the parameters semantically undocumented.

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

Purpose5/5

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

The description uses a specific verb ('Create') and resource ('drug safety flag'), clearly distinguishing it from siblings like 'openemr_drug_safety_flag_list' (read), 'openemr_drug_safety_flag_update' (modify), and 'openemr_drug_interaction_check' (analysis). The parenthetical enumeration of flag types (adverse event, recall, warning, contraindication, custom note) further clarifies the tool's scope.

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

Usage Guidelines3/5

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

The description implies usage by listing the five flag types that can be created, providing context on when to use the tool (e.g., for adverse events vs. recalls). However, it lacks explicit guidance on when NOT to use it (e.g., 'do not use for drug interaction checks') or prerequisites (e.g., patient existence verification).

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/shruti-jn/openemr-mcp'

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