Skip to main content
Glama

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

NameRequiredDescriptionDefault
nameYesa human-readable label for the key (e.g. "ci-deploy", "alice-laptop"). Must be unique for this customer.
scopeNotrust level the minted key carries. Three customer-mintable values:

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"a human-readable label for the key (e.g. \"ci-deploy\", \"alice-laptop\"). Must be unique for this customer."
    • addedInput schema / properties / scope / description
      Added value: +"trust level the minted key carries. Three customer-mintable values:"
  2. Added

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the write/non-idempotent profile is covered structurally. The description goes well beyond that by disclosing that the secret is returned only once, that only an 8-char prefix and SHA-256 hash persist, that the key is immediately usable as a Bearer token, and by enumerating 400/401/500 failure modes. That is substantive context the annotations do not carry, but with the safety profile already supplied it lands at a solid rather than exceptional level.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical warning (secret shown once) is front-loaded ahead of any mechanics, which is the right ordering. Structure is clear with Args/Returns/Examples/Error Handling sections, but the Args block largely restates schema descriptions that already have 100% coverage, so a few lines do not earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a credential-minting mutation with no output schema, the definition covers the return payload (id, name, prefix, secret, created), the irreversibility of the secret, the auth header format, and the error surface. An agent could call this correctly on the first attempt without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, and the description adds real meaning by explaining what each scope value grants (LLM_READ vs LLM_FULL tool surfaces) and by excluding MCP_GATEWAY/INTERNAL as non-mintable with a 400. However, it claims a `USER` default and three mintable values while the schema enum lists only LLM_READ and LLM_FULL, creating a mismatch an agent could trip over.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb+resource ("Mints a new API key") and pins the uniqueness constraint to the customer, so it is clearly distinguishable from scrapewise_list_api_keys and scrapewise_delete_api_key. An agent knows exactly what is produced without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit "Use when" and "Don't use when" clauses and names the alternative (scrapewise_list_api_keys) with the condition that selects it ("cheaper, no key minted"). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.