Skip to main content
Glama

Update API Test

update_api_test
DestructiveIdempotent

Replace the entire configuration of an existing API test (identified by apiTestId) with the supplied values — a full overwrite, not a partial patch, so pass every field you want to keep. Same parameters and request variables as create_api_test. Does not touch notification destinations; change those with set_api_test_destinations. If the change affects how the probe behaves (target, credential, assertions or timeout), the updated test is run once before it is saved, the same way create_api_test does; a failing trial run leaves the existing test unchanged and returns an error that says what failed. Changing only the name, interval, retries, failure threshold or enabled flag saves without a trial run. Returns the updated API test and its state. The target URL must be reachable from the public internet; private, loopback and cloud-internal addresses are refused.

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name for the API test
typeYesAPI test type: 'HTTP' or 'MCP'
mcpUrlNoMCP only: the MCP server URL to probe
enabledYesWhether the API test is enabled (scheduled) or paused
httpUrlNoHTTP only: the http(s) URL to probe. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \{{ for a literal {{.
mcpTierNoMCP only: assertion tier — HANDSHAKE, TOOLS_LIST or TOOL_CALL
retriesYesRetries per run before recording a failure (0-5)
httpBodyNoHTTP only: request body
toolNameNoMCP TOOL_CALL tier: name of the tool to invoke
apiTestIdYesId of the API test to update (from list_api_tests or get_api_test)
httpMethodNoHTTP only: request method — GET, POST, PUT, PATCH, DELETE or HEAD
httpHeadersNoHTTP only: request headers, as a name->value map
expectedToolsNoMCP TOOLS_LIST tier: tool names the server must advertise
statusPatternNoHTTP only: status matcher — '200', '2xx' or '20x'
headerMatchersNoHTTP only: response headers that must match, as a name->value map
timeoutSecondsYesPer-run timeout in seconds, 1-30
intervalSecondsYesHow often to run the API test, in seconds (minimum 30)
mcpCredentialIdNoMCP only: id of a stored credential
failureThresholdYesConsecutive failing runs before the API test flips to DOWN (1-10)
httpCredentialIdNoHTTP only: id of a stored credential; omit for unauthenticated
maxLatencyMillisNoHTTP only: fail if slower than this many milliseconds
toolArgumentsJsonNoMCP TOOL_CALL tier: JSON object of tool arguments. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \{{ for a literal {{.
bodyValidationTierNoHTTP only: body validation tier — NONE, VALID_JSON, JSON_CONTAINS (sample fields must be present with the same types, extra fields allowed), JSON_SHAPE (exact field set) or EXACT_MATCH
mcpMaxLatencyMillisNoMCP only: fail if slower than this many milliseconds
mcpProtocolRevisionNoMCP only: protocol revision policy — ANY (the default when omitted), NEWEST_SUPPORTED, or a dated revision: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28. ANY checks that the endpoint answers as an MCP server and records whatever revision it speaks, without asserting it; at the HANDSHAKE tier, a server that answers 401 or 403 when the test has no credential counts as up. NEWEST_SUPPORTED runs against the newest protocol revision the server speaks and moves with it when the server changes. A dated revision pins the test to it and the test fails if the server stops accepting it. Get the server's revisions from detect_mcp_protocol.
bodyValidationSampleNoHTTP only: sample body for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH tiers
mcpResultValidationTierNoMCP TOOL_CALL tier: result validation tier — NONE, VALID_JSON, JSON_CONTAINS, JSON_SHAPE or EXACT_MATCH
mcpResultValidationSampleNoMCP TOOL_CALL tier: sample result for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / mcpProtocolRevision / description
      Previous value: -"MCP only: protocol revision the test speaks — 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28 or NEWEST_SUPPORTED (the default when omitted). NEWEST_SUPPORTED runs against the newest protocol revision the server speaks and moves with it when the server changes; a dated revision pins the test to it and the test fails if the server stops accepting it. Get the server's revisions from detect_mcp_protocol."New value: +"MCP only: protocol revision policy — ANY (the default when omitted), NEWEST_SUPPORTED, or a dated revision: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28. ANY checks that the endpoint answers as an MCP server and records whatever revision it speaks, without asserting it; at the HANDSHAKE tier, a server that answers 401 or 403 when the test has no credential counts as up. NEWEST_SUPPORTED runs against the newest protocol revision the server speaks and moves with it when the server changes. A dated revision pins the test to it and the test fails if the server stops accepting it. Get the server's revisions from detect_mcp_protocol."
  2. Changed2 schema fields changed
    • addedInput schema / properties / mcpProtocolRevision
      Added value: +{
      +  "description": "MCP only: protocol revision the test speaks — 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28 or NEWEST_SUPPORTED (the default when omitted). NEWEST_SUPPORTED runs against the newest protocol revision the server speaks and moves with it when the server changes; a dated revision pins the test to it and the test fails if the server stops accepting it. Get the server's revisions from detect_mcp_protocol.",
      +  "type": "string"
      +}
    • changedInput schema / properties / timeoutSeconds / description
      Previous value: -"Per-run timeout in seconds; positive and not exceeding intervalSeconds"New value: +"Per-run timeout in seconds, 1-30"
  3. Changed4 schema fields changed
    • changedInput schema / properties / bodyValidationSample / description
      Previous value: -"HTTP only: sample body for JSON_SHAPE/EXACT_MATCH tiers"New value: +"HTTP only: sample body for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH tiers"
    • changedInput schema / properties / bodyValidationTier / description
      Previous value: -"HTTP only: body validation tier — NONE, VALID_JSON, JSON_SHAPE or EXACT_MATCH"New value: +"HTTP only: body validation tier — NONE, VALID_JSON, JSON_CONTAINS (sample fields must be present with the same types, extra fields allowed), JSON_SHAPE (exact field set) or EXACT_MATCH"
    • changedInput schema / properties / mcpResultValidationSample / description
      Previous value: -"MCP TOOL_CALL tier: sample result for JSON_SHAPE/EXACT_MATCH"New value: +"MCP TOOL_CALL tier: sample result for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH"
    • changedInput schema / properties / mcpResultValidationTier / description
      Previous value: -"MCP TOOL_CALL tier: result validation tier"New value: +"MCP TOOL_CALL tier: result validation tier — NONE, VALID_JSON, JSON_CONTAINS, JSON_SHAPE or EXACT_MATCH"
  4. Changed8 schema fields changed
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / failureThreshold / format
      Added value: +"int32"
    • addedInput schema / properties / intervalSeconds / format
      Added value: +"int32"
    • addedInput schema / properties / maxLatencyMillis / format
      Added value: +"int64"
    • addedInput schema / properties / mcpMaxLatencyMillis / format
      Added value: +"int64"
    • addedInput schema / properties / retries / format
      Added value: +"int32"
    • addedInput schema / properties / timeoutSeconds / format
      Added value: +"int32"
  5. Added
  6. Removed
  7. Changed2 schema fields changed
    • changedInput schema / properties / httpUrl / description
      Previous value: -"HTTP only: the http(s) URL to probe"New value: +"HTTP only: the http(s) URL to probe. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \\{{ for a literal {{."
    • changedInput schema / properties / toolArgumentsJson / description
      Previous value: -"MCP TOOL_CALL tier: JSON object of tool arguments"New value: +"MCP TOOL_CALL tier: JSON object of tool arguments. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \\{{ for a literal {{."
  8. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructive=true, idempotent=true and openWorld=true, and the description goes well beyond that: it discloses the pre-save trial run for probe-affecting changes, that a failing trial leaves the existing test unchanged and returns an error naming the failure, that metadata-only edits skip the run, what is returned, and that private/loopback/cloud-internal targets are refused. This is exactly the mutation-behavior context an agent needs and cannot infer from the hints.

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-loads the critical overwrite warning in the first sentence and every following sentence carries distinct information (destinations scope, trial-run trigger, error semantics, return value, URL restriction). It runs long as a single dense paragraph, so it is slightly heavier than needed, but there is no filler.

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 28-parameter destructive mutation with no output schema, the description covers the overwrite contract, the validation side effects, failure and error behavior, the returned value, and a hard constraint on target URLs. Nothing an agent needs in order to call it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100% across all 28 parameters, so the schema already carries the per-field meaning, enums and variables; the description only groups fields into 'target, credential, assertions or timeout' and defers the rest to create_api_test. Per the baseline rule, 3 is correct when the schema does the heavy lifting, and the description adds only a pointer rather than new field-level meaning.

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 ('Replace the entire configuration') plus resource ('an existing API test') and immediately clarifies the overwrite semantics versus a patch. It explicitly names the sibling it is not (set_api_test_destinations) and points to create_api_test for the field set, so an agent can distinguish it from neighbors without opening a 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?

Explicitly tells the caller to pass every field they want to keep, routes notification changes to set_api_test_destinations, and ties parameter shape to create_api_test. It also gives the use-case split between probe-affecting fields (trial run) and metadata-only fields (no trial run), which is exactly the decision an agent must make before calling.

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