Pause a function

SDK platic.tools.functions.pause()

Set the function to paused so no agent can see or call it. The code, versions, bound secrets, and agent connections are kept. Activate it to use it again.

Example

await platic.tools.functions.pause("fn_123");

Path parameters

ParameterTypeDescriptionRequired
functionIdstringFunction ID✓

Request body

It has no body.

Response

data has the complete function, with the fields of Get a function.

{
  "status": "success",
  "message": "Function paused: no agent sees it",
  "data": {
    "id": "Hk2s9QmXc1",
    "name": "tax_id_lookup",
    "status": "paused",
    "liveVersion": 2,
    "toolName": "fn_tax_id_lookup",
    "toolId": null,
    "nextStep": "Paused: no agent sees it. Enable it again with POST /v1/tools/functions/Hk2s9QmXc1/enable."
  }
}

Some fields are left out of the example.

Errors

Statusdetails.codeWhen
403FORBIDDEN or INSUFFICIENT_SCOPEThe credential does not have write access to Integrations
404NOT_FOUNDThe function does not exist in this workspace

Notes

  • Pausing the function affects all agents. For a single agent to stop using it, pause its connection.
  • Pausing does not undo what the function already did in other systems.
  • To delete it completely, use Delete a function.