Skip to main content
Glama

Create API Test Credential

create_api_test_credential

Store a reusable auth credential that API tests can use to reach a protected endpoint. Pick a type and fill the matching fields: BASIC (username+password), BEARER (token), API_KEY (apiKeyHeaders for header-placed keys and/or apiKeyQueryParams for query-string keys — at least one entry across the two), or OAUTH2_CLIENT_CREDENTIALS (tokenUrl+clientId+ clientSecret, optional scope/audience). The secret is write-only: the response returns only id, name and type — reference the returned id from an API test's httpCredentialId or mcpCredentialId.

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name for the credential, e.g. 'prod API key'
typeYesCredential type: BASIC, BEARER, API_KEY or OAUTH2_CLIENT_CREDENTIALS
scopeNoOAUTH2_CLIENT_CREDENTIALS only: requested scope
tokenNoBEARER only: the bearer token (secret, never returned)
audienceNoOAUTH2_CLIENT_CREDENTIALS only: requested audience
clientIdNoOAUTH2_CLIENT_CREDENTIALS only: client id
passwordNoBASIC only: password (secret, never returned)
tokenUrlNoOAUTH2_CLIENT_CREDENTIALS only: token endpoint URL
usernameNoBASIC only: username
clientSecretNoOAUTH2_CLIENT_CREDENTIALS only: client secret (secret, never returned)
apiKeyHeadersNoAPI_KEY only: keys sent as request HEADERS, as a map of header name -> value (values are secret, never returned). Combine with apiKeyQueryParams when some keys belong in the query string instead
apiKeyQueryParamsNoAPI_KEY only: keys sent as URL QUERY parameters, as a map of parameter name -> value (values are secret, never returned). Combine with apiKeyHeaders when some keys belong in headers instead

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Added
  3. Removed
  4. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the safety/state profile (non-read-only, non-idempotent, non-destructive, closed-world), and the description adds genuinely new behavior: the secret is write-only and the response returns only id, name and type. It does not warn that retries create duplicate credentials, but the key lifecycle disclosure is present.

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?

Front-loaded with purpose, then the type-to-fields mapping, then the return contract. Dense but every clause carries information; only minor compression is possible.

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?

With no output schema, the description supplies the return contract (id, name, type) and how the id is consumed by API tests. For a 12-parameter tool with nested objects and conditional requirements, all the critical call-shaping information is present.

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 the baseline is 3. The description exceeds it by aggregating the per-type conditional requirements (BASIC=username+password, BEARER=token, OAUTH2=tokenUrl+clientId+clientSecret) and stating the constraint that API_KEY needs at least one entry across apiKeyHeaders/apiKeyQueryParams — a rule not present in the schema.

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?

States a specific verb and resource: 'Store a reusable auth credential that API tests can use to reach a protected endpoint.' This distinguishes it clearly from sibling create_api_test and from unrelated create_* tools.

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

Usage Guidelines4/5

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

Gives clear context for when to use it — provisioning a credential an API test will reference via httpCredentialId/mcpCredentialId. It does not name alternatives (e.g., list_api_test_credentials to reuse an existing one, delete_api_test_credential), so exclusions are absent.

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.

Resources