Feature × Audience

How do healthcare teams use function calling with Plugsky?

Healthcare teams use Plugsky function calling to wrap read-heavy workflows — appointment lookups, eligibility checks, care-gap summaries and documentation drafts — in a controlled tool loop. The model returns structured tool_calls, your service executes them, and anything that writes to a clinical system stays behind human approval. Redact PHI before prompting, pin one region, and export audit events to your SIEM.

Key facts

Tools shapeOpenAI-compatible tools array on /v1/chat/completions with tool_calls responses (live)
LoopThe model requests a tool, your code executes it, and results return as role=tool messages
Determinismtool_choice forces or forbids a tool; strict:true enforces the exact schema
PII handlingNo-PII mode auto-redacts, detect-only tags, passthrough leaves controls to your app
Model tieringplugsky-micro and plugsky-lite for extraction; plugsky-pro and frontier tiers for reasoning
ResidencyPin to me-central-1, sa-central-1, eu-west-1, eu-central-1, us-east-1, us-west-2 or ap-southeast-1
AuditKey lifecycle and inference metadata exportable to Splunk, Sentinel, QRadar or Chronicle
RoadmapAssistants and responses endpoints are coming soon; the chat completions tool loop is live

TL;DR

  • Model scheduling, eligibility, documentation and care-gap steps as typed tools.
  • Keep every write to a clinical or EHR-adjacent system behind human approval.
  • Redact PHI before prompting and pin the workspace to a single region.
  • Route extraction to plugsky-micro or plugsky-lite and reasoning to stronger tiers.
  • Export key and inference events to your SIEM for reviewable evidence.

How it works, step by step

  1. Pick one read-heavy workflow and list the tools it needs, marking anything that writes as approval-only.
  2. Define each tool as a JSON Schema object with typed fields and clear descriptions; scaffold them with the schema generator.
  3. Build the loop: send the tools array, execute returned tool_calls, append role=tool results and repeat until the model answers.
  4. Redact identifiers before the prompt and choose the PII mode that matches your policy.
  5. Pin the workspace to one region and set retention for the workload.
  6. Test against historical cases and measure whether the agent picks the right tool and escalates when it should.
  7. Stream tool, key and admin events to your SIEM and keep clinicians in the loop.
1Pick one read-heavyworkflow and listthe tools it needs,2Define each tool asa JSON Schemaobject with typed3Build the loop:send the toolsarray, execute4Redact identifiersbefore the promptand choose the PII5Pin the workspaceto one region andset retention for6Test againsthistorical casesand measure whether

Try it yourself

Open the function calling schema generator →

Where function calling fits in clinical operations

Start where the work is read-heavy: checking appointment status, verifying insurance eligibility, summarising a care gap, or pulling recent results into a draft note. In Plugsky terms each of those is a tool — a JSON Schema object you send in the tools array on /v1/chat/completions. The model decides which tool to call, returns structured arguments, and your service executes the lookup against systems you already control.

Anything that writes — rescheduling a patient, changing a prescription, closing a referral — should be modelled as an approval-only step. The agent prepares the change and a named human releases it. That separation is what makes the workflow defensible in a clinical review.

Protecting PHI inside the tool loop

Redact before you prompt. Plugsky supports three PII modes: no-PII, which filters and auto-redacts identifiers; detect-only, which tags them; and passthrough, where your application owns the controls. For most clinical workflows no-PII is the right default, with your own gateway doing a second pass on names, medical record numbers and dates of birth.

  • Residency: pin the workspace to one region so prompts and logs stay in-country.
  • Retention: request and response bodies are not stored, and prompts are not used to train models.
  • Keys: use project-scoped keys per environment so a staging agent can never reach production tools.

Evaluation and staged rollout

Build an evaluation set from historical cases with known outcomes: triage notes, eligibility questions, medication queries. Measure whether the agent chooses the correct tool and whether it escalates when it should, not just whether the final text reads well. Log every tool call, then review a sample weekly until precision holds.

Start with one workflow, one team and clinicians in the loop. The free plan with plugsky-micro and plugsky-lite is enough to build the loop; move to paid tiers or the 14-day full-access trial when you widen scope. Enterprise contracts add a BAA and customer-managed keys where your compliance team needs them.

Honest comparison

ConcernPlugsky tool loopVendor agent platformBuilding in-house
ProtocolOpenAI-compatible tools on /v1/chat/completionsVendor-specific assistants APICustom runtime you maintain
Model choice30+ models, tier per stepVendor catalogue onlyYou host and serve each model
PHI controlsNo-PII, detect-only or passthrough modesVaries by vendorYou build redaction
ResidencyRegion pinning plus VPC, on-prem and air-gappedUsually a few global regionsWherever you deploy
AuditKey and inference events exportable to SIEMVendor-managed logsYour own implementation

Frequently asked questions

Does Plugsky store patient data?

Request and response bodies are not stored, and prompts are not used to train models. You should still redact PHI before prompting and keep retention aligned with your own policy.

Can the agent write to our EHR?

Treat writes as approval-only. The model only returns tool calls; your service executes them. Keep a named human releasing any change that affects a patient record.

Do the free models support tool calling?

Yes. plugsky-micro and plugsky-lite implement the OpenAI tools shape, which is enough for extraction and routing. Move planning steps to paid tiers when you need stronger reasoning.

How many tools should we expose?

Keep the set deliberate. Around 5 to 20 well-described tools is the practical range; beyond that, selection accuracy drops and every definition consumes context on each request.

Can we run this on-prem or air-gapped?

Yes. The same API runs in VPC, on-prem and air-gapped deployments for regulated environments.

Does function calling work with streaming?

Yes. Streaming and OpenAI-style function calling are both live on chat completions, so you can show progress while tools execute.

How do we test schemas before rollout?

Validate arguments against your schema with the function calling schema generator, then run a regression set of historical cases before widening access.