scrapewise_create_api_key
Mints a new API key under the given `name` (unique per customer). The full
secret is returned ONCE in the response body; only the 8-char prefix and a
SHA-256 hash are persisted, so the secret cannot be retrieved later — capture
it at the call site. The returned key is immediately usable as
`Authorization: Bearer <key>` on any authenticated endpoint.
Args:
- name (string, query param, required): a human-readable label for the key
(e.g. "ci-deploy", "alice-laptop"). Must be unique for this customer.
- scope (string, query param, optional, default `USER`): trust level the
minted key carries. Three customer-mintable values:
- `USER` — full customer-level access (default; preserves pre-M5.0
single-arg call sites that pre-date the scope-picker).
- `LLM_READ` — public MCP gateway, read-only tools (M5.0).
- `LLM_FULL` — public MCP gateway, full tool surface (M5.0; opt-in).
`MCP_GATEWAY` (legacy single-tenant) and `INTERNAL` (service-to-service) are
NOT customer-mintable; passing either returns 400.
Returns:
GeneratedApiKeyDTO including id, name, prefix, the full secret string, and
created timestamp. The secret will NEVER be returned again.
Examples:
- Use when: "create an API key called 'ci-deploy' for me"
- Don't use when: you only need to LIST existing keys → use
scrapewise_list_api_keys (cheaper, no key minted)
Error Handling:
- 400 if a key with this `name` already exists for this customer, or if
`scope` is not customer-mintable.
- 401 Unauthorized.
- 500 INTERNAL.[runtime hint] This tool returns JSON-as-text — its response shape is dynamic (per-scraper itemsConfig, file binary, etc.) so the MCP outputSchema is omitted. Do not rely on the presence of any specific field in the response; treat the result as a string-or-object blob and parse defensively.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "scrapewise_create_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | a human-readable label for the key (e.g. "ci-deploy", "alice-laptop"). Must be unique for this customer. | |
| scope | No | trust level the minted key carries. Three customer-mintable values: |