create
Adds a new FHIR resource (e.g., Patient or Observation) to the server via POST; use it only for records that do not exist yet—modify existing ones with update.
Instructions
Creates a new FHIR resource on the server (FHIR create interaction: POST [base]/{type}). Use it to add a record that does not exist yet, such as a new Patient, Observation or Appointment. Do not use it to change an existing resource; use update for that. The server assigns a new id on every call, so repeating a call creates duplicates; use search first if the record may already exist. On success it returns the resource as stored, including the server-assigned id and meta. On failure it returns OperationOutcome issues whose diagnostics explain what to fix, such as a missing required element or an invalid code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"payload": "<payload>"
},
"name": "create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The FHIR resource type name. Must exactly match one of the resource types supported by the server. | |
| payload | Yes | The JSON body of the new resource. Include every element the resource's profile marks as required, or the server rejects the request. Set `resourceType` to the same value as `type`; if omitted, it defaults to `type`. Leave out `id` and `meta`, which the server assigns. | |
| operation | No | The name of a custom FHIR operation or extended query defined for the resourceMust match one of the operation names returned by `get_capabilities`. | |
| searchParam | No | A mapping of FHIR search parameter names to their desired values. These parameters refine queries for operation-specific query qualifiers. Only parameters exposed by `get_capabilities` for that resource type are valid. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | A dictionary containing the newly created FHIR resource, including server-assigned fields (id, meta.versionId, meta.lastUpdated, and any server-added extensions). Reflects exactly what was persisted. |