Read an agent's tools for a share link

GET
/v1/agents/{id}/share-links/tools

Lists the tools the agent has, for its published version (live) and its draft as it is now (draft), as a share link would carry them: a tool that only reads is on for every link (read), a tool that may change something is off until you name it in toolsOn when you make the link, and a tool that would send a message, place a call or transfer to a destination taken from the conversation is never available (alwaysOff). Each carries reason, the one sentence that says why. Read the draft's list before you make a link to the draft: it is the version the link will run.

Requires an API key with the share_links:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The agent id.

Response Body

The agent's tools as a link would carry them, for its published version and its draft

application/json
  1. response
live*array<>|

The tools of the agent's published version, or null when it has none to share.

draft*array<>|

The tools of the agent's draft as it is now, or null when the draft cannot be shared as it is (see draftProblem).

draftProblem?string

Why the draft cannot be shared, when it cannot.

Lengthlength <= 200
Example Request
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/share-links/tools" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "live": [    {      "name": "lookup_order",      "source": "http",      "read": true,      "alwaysOff": false,      "reason": "It only reads, so it is on for every link."    },    {      "name": "refund_order",      "source": "http",      "read": false,      "alwaysOff": false,      "reason": "A stranger could make your agent change something real or spend through it before you chose that."    },    {      "name": "vl_send_text",      "source": "action",      "read": false,      "alwaysOff": true,      "reason": "A stranger could make your agent text, call or transfer to a number they chose."    }  ],  "draft": null,  "draftProblem": "tool_secret_header"}