Native AI Agent API Testing Tools
PostQode includes a set of native tools built directly into the agent execution engine that allow AI agents to manage and execute API collections, test suites, and environment variables programmatically.
Overview of Native API Tools
When working with API Agent or Core Agent, the model can automatically invoke native API tools to perform CRUD operations on API collections and execute test runs.
| Native Tool | Handler Class | Description |
|---|---|---|
list_api_collections | ListApiCollectionsHandler | Lists all existing API collections in the workspace. |
create_api_request | CreateApiRequestHandler | Creates a new HTTP request (GET, POST, PUT, DELETE) within a collection. |
update_api_request | UpdateApiRequestHandler | Modifies headers, parameters, body, or authentication for an API request. |
delete_api_request | DeleteApiRequestHandler | Removes an API request from a collection. |
execute_api_request | ExecuteApiRequestHandler | Executes an API request and retrieves status codes, headers, and response payload. |
list_test_suites | ListTestSuitesHandler | Lists test suites and assertion suites in the project. |
create_test_suite | CreateTestSuiteHandler | Creates a structured test suite containing multiple test cases. |
create_test_case | CreateTestCaseHandler | Adds functional test cases with assertions to a test suite. |
create_variables | CreateVariablesHandler | Defines environment or collection variables (e.g. baseUrl, authToken). |
import_library | ImportLibraryHandler | Imports OpenAPI/Swagger specs or Postman collections. |
Example Workflow
Automated Collection Generation from Prompt
When you instruct PostQode:
"Import this OpenAPI spec and test all endpoint responses for valid 200 OK status codes."
- The AI agent invokes
import_libraryto parse the API specification. - It calls
create_test_suiteandcreate_test_caseto build structured assertions for each endpoint. - It executes requests using
execute_api_requestand records response payloads and response times. - It reports any failed assertions or unexpected schema errors directly in the chat interface.