put_claims_auto_approval_clinics_by_orgid

Changes data · you confirm first Idempotent

Calls PUT /api/claims/auto-approval/clinics/{orgId} as the signed-in person · REST reference

Trust a clinic's claims to the auto-approval rules, or stop trusting them

Sets whether the service provider's claims may be approved by the rules without a person. In every mode a claim from a clinic that is not trusted holds on CLINIC_TRUSTED, so SHADOW shows what ENFORCE would do for it. Trusting stamps when and by whom; stopping clears it. The clinic's trust is read first: re-stating it writes nothing — no audit row, the first stamp kept — and answers the settings as they stand. Only a service provider is ever trusted — any other organization is refused, and retyping a clinic away from SERVICE_PROVIDER clears its trust. Gated as the mode; written on the caller's own credential, so the DAL decides and its audit row names the person, with the trust before and after.

Arguments

ArgumentTypeDescription
orgIdpathstring (uuid)requiredThe service provider.
bodyJSONobjectrequiredThe request body, as a JSON object. Its fields are listed below.

Fields of body

FieldTypeDescription
trustedbooleanrequired

Example call

A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "put_claims_auto_approval_clinics_by_orgid",
    "arguments": {
      "orgId": "11111111-1111-4111-8111-111111111111",
      "body": {
        "trusted": true
      }
    }
  }
}
Confirmation
The client shows the person the exact request and waits. Nothing runs until they tick Make this change. See Reading and changing.

Result

On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.

The settings after the change, or as they stand when the clinic's trust was already that.

json
{
  "canChange": true,
  "mode": "OFF",
  "modeChangedAt": 1,
  "modeChangedBy": "11111111-1111-4111-8111-111111111111",
  "modeChangedByName": "string",
  "policy": {
    "auditSampleRate": 1,
    "checks": [
      "READABLE"
    ],
    "confidenceFloor": 1,
    "coverage": [
      {}
    ],
    "version": "string"
  },
  "trustedClinics": [
    {
      "name": "string",
      "orgId": "11111111-1111-4111-8111-111111111111",
      "trustedAt": 1,
      "trustedBy": "11111111-1111-4111-8111-111111111111",
      "trustedByName": "string"
    }
  ]
}

Fields

FieldTypeDescription
canChangebooleanWhether this caller may change the mode and the trusted clinics, computed by the server from the same rule the two PUTs gate on: platform staff whom the DAL answers hold execute:UpdateOrgCommand as platform authority — a global grant held through the platform organization, the test both settings are written under. An organization's own grant of it, the platform organization's included, is not that. Offer the controls only when it is true; a PUT from anyone else answers 403.
mode"OFF" | "SHADOW" | "ENFORCE"What the claim auto-approval sweep does with each CLAIMED voucher. OFF decides nothing. SHADOW decides each claim by the rules and records the decision on the delivery trail, approving nothing. ENFORCE approves, with no person, every claim the rules pass from a clinic Pawsitive Future trusts, at the amount the rules propose, and records every hold. A claim the rules hold waits for a reviewer exactly as it would with the switch OFF.
modeChangedAtinteger | nullWhen the mode last changed to the value it holds, epoch milliseconds; null if it never has.
modeChangedBystring (uuid) | nullThe user who last changed the mode; null when it never changed, or no person did.
modeChangedByNamestring | nullmodeChangedBy by name, first and last; null when there is none, or that user is no longer on record or has no name.
policyobjectWhat the rules decide by — read-only, fixed per policy version, which every decision is recorded under. ENFORCE pays the covered lines the policy recognises, never more than the invoice's total, capped at the voucher's payout cap; every check must pass and each holds on failure, none denies.
policy.auditSampleRatenumberThe share of claims, 0 to 1, held for an independent check whatever else they pass.
policy.checksarray of "READABLE" | "ARITHMETIC" | "ENTERED_TOTAL" | "NO_INJECTION" | "LINES_CLASSIFIED" | "CORE_PROCEDURE" | … (14 values)Every check, in the order a decision lists them.
policy.confidenceFloornumberThe least confidence, 0 to 1, the invoice reading must carry to approve.
policy.coveragearray of object
policy.coverage[].ceilingCentsinteger | nullThe most one line of it pays, in CENTS; null for no limit.
policy.coverage[].corebooleanThe procedure itself — every claim bills exactly one.
policy.coverage[].coveredbooleanPaid at all. A line the policy does not recognise is never paid and holds the claim.
policy.coverage[].idstringThe category, e.g. SPAY, NEUTER, ANESTHESIA, PAIN_MEDICATION, PREOP, E_COLLAR.
policy.versionstring
trustedClinicsarray of objectEvery trusted service provider, by name.
trustedClinics[].namestring
trustedClinics[].orgIdstring (uuid)
trustedClinics[].trustedAtinteger | nullWhen it was trusted, epoch milliseconds.
trustedClinics[].trustedBystring (uuid) | nullThe user who trusted it; null when no person did.
trustedClinics[].trustedByNamestring | nulltrustedBy by name, first and last; null when no person trusted it, or that user is no longer on record or has no name.

When it fails

A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.

400

orgId is not a UUID (orgId must be an organization id (a UUID)), trusted is not a boolean (trusted must be true or false), or the organization is not a service provider (Only a service provider can be trusted for claim auto-approval: <name> is a <TYPE> organization). Nothing is written.

403

The caller is not platform staff, holds no execute:ApproveVoucherCommand, or does not hold execute:UpdateOrgCommand as platform authority — the caller canChange is false for (Access denied. Missing required permission.). Nothing is read or written: the one DAL call a refusal makes is that question.

404

No live organization has that id (Organization not found or already deleted).

What the model is shown

This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.

json
{
  "name": "put_claims_auto_approval_clinics_by_orgid",
  "description": "PUT /api/claims/auto-approval/clinics/{orgId} — Sets whether the service provider's claims may be approved by the rules without a person. In every mode a claim from a clinic that is not trusted holds on CLINIC_TRUSTED, so SHADOW shows what ENFORCE would do for it. Trusting stamps when and by whom; stopping clears it. The clinic's trust is read first: re-stating it writes nothing — no audit row, the first stamp kept — and answers the settings as they stand. Only a service provider is ever trusted — any other organization is refused, and retyping a clinic away from SERVICE_PROVIDER clears its trust. Gated as the mode; written on the caller's own credential, so the DAL decides and its audit row names the person, with the trust before and after.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "orgId": {
        "type": "string",
        "description": "The service provider."
      },
      "body": {
        "type": "string",
        "description": "The JSON request body: { trusted*: boolean }"
      }
    },
    "required": [
      "orgId",
      "body"
    ]
  },
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": true,
    "openWorldHint": false
  }
}