nanonetshealth_call_operation, a single generic tool for calling named operations in Nanonets Health (Fleming), such as the census billing-line store.
Nanonets Health owns each operation: its name, its params schema, its validation and the permission it requires. New operations are added in Nanonets Health and become callable through this tool without a new Agents Platform tool — but only once an admin adds them to a tool’s allowlist.
Authentication and enablement
The tool uses the Nanonets Health integration. The platform injects:api_key
manage_patients (save) and view_patients (get).
The tool is off by default. Enable it per agent and configure its allowlist.
Allowed operations (required)
allowed_operations is a configuration-only setting: a comma-separated list of operation names, set in the tool settings and never chosen by the model.
delegate_tasks, where an empty allowlist allows every agent. These operations read and write patient data, so an enabled tool that has not been configured must not be able to reach all of it. Until allowed_operations is set, every call fails with an error saying the tool needs an allowlist.
The allowlist is enforced inside the tool before any request is sent. A call to an operation that is not listed is refused with an error naming the operations that are allowed.
The allowlist only narrows what Nanonets Health already permits: an allowed operation still fails if the API key’s role lacks that operation’s permission.
Enable this tool only as a configured tool with allowed_operations bound. A bound value always overrides one sent by the model, so the allowlist holds. If the base tool is enabled directly instead, nothing binds allowed_operations, and a model that sends the field itself would supply its own allowlist. Nanonets Health still enforces the API key’s role on every operation in that case, but the tool’s own allowlist no longer narrows it.
Inputs
operation(required): the operation name, for examplecensus_billing_lines.get.params: the operation’s arguments as a JSON object. Omit it, or send{}, for none. Params are validated strictly by Nanonets Health: unknown fields are rejected.
Discovering operations
Calloperations.list with no params. It returns each operation’s name, description, params_schema and required permission — metadata only, never patient data.
Nanonets Health lists only the operations the API key’s role may call, and the tool then removes any operation not on its allowlist, so the list shows exactly what this tool can do. operations.list needs no allowlist entry of its own, but it is still refused while the allowlist is empty.
Operations available today
census_billing_lines.save
Params: phs_id, census_year, census_month (1–12), source_type (csv, excel or pdf), billing_lines — all required — plus optional source_file_name, source_task_id, reviewed and content_hash.
Each billing line takes patient_name (required), resident_id, payer_code, payer_name, start_day and end_day. start_day/end_day are day-of-month bounds of the resident’s stay within the census month, validated against the month’s real length.
- The call replaces the whole facility-month: lines you omit are deleted. An empty
billing_linesis rejected rather than treated as a delete. At most 20,000 lines. - Identical content is a no-op. Nanonets Health hashes the submitted lines itself; if
content_hashis sent it must match that hash. reviewed: trueis accepted only forsource_type: pdf, and only for a census whose extraction passed human review.
status is unchanged when the content already matched; nothing is rewritten.
census_billing_lines.get
Params, all optional: phs_id, census_year, census_month (requires census_year), limit (default and maximum 20,000).
Result: {"operation": "census_billing_lines.get", "result": {"data": [...], "total": N}}. Each line carries phs_id, census_year, census_month, patient_name, resident_id, payer_code, payer_name, start_day, end_day, source_file_name, source_task_id, source_type, reviewed, content_hash and created_at.
Retention
Stored census billing lines are purged 90 days after they are written. An emptydata array means “not stored (any more)”, not “no residents”.
Errors
- No
allowed_operationsconfigured → every call refused; nothing is sent. - Operation not on the allowlist → refused with the allowed list; nothing is sent.
- Unknown operation → HTTP 404 from Nanonets Health.
- API key role lacks the operation’s permission → HTTP 403.
- Params that fail validation, including unknown fields → HTTP 400 with the reason.
Output variables
Every successful result is stored as a JSON-valued task variable. Use theoutput_variable the tool result returns, for example ${VAR_N}.result.data or ${VAR_N}.result.status.