Skip to main content
Glama
dtkmn

MCP ZAP Server

zap_target_import

Import OpenAPI/Swagger, GraphQL, or SOAP definitions into ZAP to prepare API endpoints for security testing.

Instructions

Import an OpenAPI/Swagger definition, GraphQL schema, or SOAP WSDL to prepare API endpoints for testing. Use when you have an API definition; use zap_crawl_start to discover ordinary web pages. Requires a reachable, configured ZAP instance with the matching OpenAPI, GraphQL, or SOAP add-on. Import changes the current ZAP session and may send requests to the definition source and API targets; use only authorized targets. It does not start an active scan: after reviewing import messages, call zap_attack_start with the API target URL when active testing is needed. Returns plain text containing definition type, source kind, source, and ZAP import messages or job IDs when provided, not findings or a structured JSON result. Review warnings before proceeding. Invalid inputs, blocked URLs, and ZAP API failures raise errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesRequired HTTP(S) definition URL reachable by ZAP and allowed by server URL policy, or a file path readable inside the ZAP host/container (for example /zap/wrk/openapi.yaml). File contents are not accepted here.
sourceKindYesRequired source mode: url for a definition ZAP downloads, or file for a definition on ZAP's filesystem. Case-insensitive.
endpointUrlNoRequired for graphql: HTTP(S) API endpoint to test, for example https://api.example.com/graphql; must be reachable by ZAP and allowed by server URL policy. Ignored for openapi and soap.
hostOverrideNoOptional OpenAPI target override allowed by server URL policy: a full HTTP(S) URL or authority/path with an explicit host, for example https://api.example.com/v1 or api.example.com:9090/v1. Scheme-only and path-only overrides are rejected; use a full URL instead. Omit or leave blank only for trusted definition-derived targets constrained by ZAP egress controls. Ignored for graphql and soap.
definitionTypeYesRequired definition format: openapi (OpenAPI/Swagger), graphql (GraphQL schema), or soap (WSDL). Case-insensitive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.14.0
    • changedInput schema / properties / definitionType / description
      Previous value: -"Definition type: openapi, graphql, or soap"New value: +"Required definition format: openapi (OpenAPI/Swagger), graphql (GraphQL schema), or soap (WSDL). Case-insensitive."
    • changedInput schema / properties / endpointUrl / description
      Previous value: -"Optional GraphQL endpoint URL when definitionType is graphql"New value: +"Required for graphql: HTTP(S) API endpoint to test, for example https://api.example.com/graphql; must be reachable by ZAP and allowed by server URL policy. Ignored for openapi and soap."
    • changedInput schema / properties / hostOverride / description
      Previous value: -"Optional host override when definitionType is openapi"New value: +"Optional OpenAPI target override allowed by server URL policy: a full HTTP(S) URL or authority/path with an explicit host, for example https://api.example.com/v1 or api.example.com:9090/v1. Scheme-only and path-only overrides are rejected; use a full URL instead. Omit or leave blank only for trusted definition-derived targets constrained by ZAP egress controls. Ignored for graphql and soap."
    • changedInput schema / properties / source / description
      Previous value: -"Definition source URL or file path"New value: +"Required HTTP(S) definition URL reachable by ZAP and allowed by server URL policy, or a file path readable inside the ZAP host/container (for example /zap/wrk/openapi.yaml). File contents are not accepted here."
    • changedInput schema / properties / sourceKind / description
      Previous value: -"Source kind: url or file"New value: +"Required source mode: url for a definition ZAP downloads, or file for a definition on ZAP's filesystem. Case-insensitive."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that import mutates the current ZAP session, may send requests to the definition source and API targets, requires authorization, and does NOT start an active scan. It also states the return format (plain text with definition type, source kind, source, and import messages/job IDs) and that invalid inputs, blocked URLs, and ZAP API failures raise errors.

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

Conciseness5/5

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

The description is front-loaded with purpose, then usage, then behavior, then return/error semantics. Despite its length, every sentence adds distinct information for a complex, unannotated tool, so no sentence is wasted.

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 tool with no annotations and no output schema, the description covers the safety profile (session mutation, egress, authorization), prerequisites (configured ZAP instance and add-on), the return shape in lieu of an output schema, and error behavior. Nothing an agent needs 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%, so the schema already documents source, sourceKind, endpointUrl, hostOverride, and definitionType in detail. The description notes the add-on matching requirement but adds no syntax or format detail beyond what the schema provides, so the baseline 3 is appropriate.

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 (import) plus the resource (OpenAPI/Swagger definition, GraphQL schema, SOAP WSDL) and the goal (prepare API endpoints for testing). It explicitly distinguishes itself from zap_crawl_start for ordinary web pages, so an agent can pick the right tool 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?

Gives when-to-use ('when you have an API definition'), names the alternative and its condition ('use zap_crawl_start to discover ordinary web pages'), and sequences the downstream action ('call zap_attack_start ... when active testing is needed'). It also states the prerequisite of a reachable, configured ZAP instance with the matching add-on.

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