API ReferenceTools

Get required scopes for toolsv3.1Legacy

Deprecated

POST
/api/v3.1/tools/scopes/required

DEPRECATED: Use POST /api/v3.1/toolkits/{toolkit_slug}/scopes/recommended instead, discovering its grant_context options with GET /api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context. Resolves required scopes for the specified tools at a given toolkit version. All requested tools must belong to the same toolkit. Returns the flat scope union plus per-tool structured scope requirements when available.

Authorization

ApiKeyAuth
x-api-key<token>

Project API key authentication

In: header

Request Body

application/json

toolsarray of stringRequired

Tool slugs to resolve scopes for. All tools must belong to the same toolkit.

versionstring

Toolkit version to resolve scopes against for the requested toolkit. Defaults to the latest published version ("latest") when omitted.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v3.1/tools/scopes/required" \  -H "Content-Type: application/json" \  -d '{    "tools": [      "GMAIL_FETCH_EMAILS",      "GMAIL_SEND_EMAIL"    ]  }'
{  "scopes_required": [    "channels:read",    "chat:write",    "https://www.googleapis.com/auth/gmail.modify",    "repo",    "user:email"  ],  "per_tool_requirements": [    {      "tool": "string",      "scope_requirements": {        "all_of": [          "string"        ],        "source": [          "string"        ]      }    }  ]}