{"openapi":"3.1.0","info":{"title":"Trunk (BYOK) API","version":"0.1.0","description":"Trunk (BYOK) lets an AI assistant read your own Trunk data through the Trunk API with a key you supply (Trunk organization API key). Read-only: 6 tools (list_test_collections, get_test_collection, list_tests, get_test, list_test_status_history, list_test_runs). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-trunk-flaky-tests.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-trunk-flaky-tests/docs"},"termsOfService":"https://connectorbay.com/byok-trunk-flaky-tests/terms"},"servers":[{"url":"https://byok-trunk-flaky-tests.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-trunk-flaky-tests/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_test_collections":{"post":{"operationId":"list_test_collections","summary":"List the test collections in your Trunk organization, newest first, with test counts and quarantine settings. Use for \"W","description":"List the test collections in your Trunk organization, newest first, with test counts and quarantine settings. Use for \"Which Trunk test collections do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from a previous response's nextCursor.","title":"Cursor"},"q":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Case-insensitive substring match on the collection name.","title":"Q"}},"title":"list_test_collectionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_test_collection":{"post":{"operationId":"get_test_collection","summary":"Get one test collection: name, description, test count and whether quarantine and auto-quarantine are on. Use for \"Show ","description":"Get one test collection: name, description, test count and whether quarantine and auto-quarantine are on. Use for \"Show Trunk test collection a1b2c3d4\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"collection_id":{"description":"Test collection id (8 alphanumeric characters, from list_test_collections).","maxLength":20,"title":"Collection Id","type":"string"}},"required":["collection_id"],"title":"get_test_collectionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tests":{"post":{"operationId":"list_tests","summary":"List and search tests across your collections with status (healthy, flaky or broken), quarantine state, file, owners and","description":"List and search tests across your collections with status (healthy, flaky or broken), quarantine state, file, owners and last failure time. Use for \"Which tests are flaky in Trunk right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from a previous response's nextCursor.","title":"Cursor"},"test_collection_id":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Only tests in this collection id.","title":"Test Collection Id"},"status":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated statuses to include: healthy, flaky, broken.","title":"Status"},"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search, with optional file:, class:, parent: or name: qualifiers.","title":"Q"},"file":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Substring match on the test file path.","title":"File"},"owner":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Exact match on one code owner.","title":"Owner"},"quarantine_state":{"anyOf":[{"enum":["quarantined","notQuarantined"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter on effective quarantine state.","title":"Quarantine State"},"sort":{"anyOf":[{"enum":["name","lastRunAt","lastFailureAt"],"type":"string"},{"type":"null"}],"default":"name","description":"Sort field (name, lastRunAt, lastFailureAt; metric sorts are not offered here).","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"}},"title":"list_testsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_test":{"post":{"operationId":"get_test","summary":"Get one test by id: status, quarantine state, file, owners, labels and first-seen and last-failure times. Use for \"Show ","description":"Get one test by id: status, quarantine state, file, owners, labels and first-seen and last-failure times. Use for \"Show details of Trunk test t_8f3k2d9a\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"test_id":{"description":"Trunk test id (opaque, taken from list_tests).","maxLength":120,"title":"Test Id","type":"string"}},"required":["test_id"],"title":"get_testArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_test_status_history":{"post":{"operationId":"list_test_status_history","summary":"List a test's status transitions (healthy, flaky, broken), newest first, with the monitors that were active. Use for \"Ho","description":"List a test's status transitions (healthy, flaky, broken), newest first, with the monitors that were active. Use for \"How did Trunk test t_8f3k2d9a change status over time\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"test_id":{"description":"Trunk test id (opaque, taken from list_tests).","maxLength":120,"title":"Test Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from a previous response's nextCursor.","title":"Cursor"},"started_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only transitions at or after this ISO 8601 time.","title":"Started After"},"started_before":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only transitions before this ISO 8601 time.","title":"Started Before"}},"required":["test_id"],"title":"list_test_status_historyArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_test_runs":{"post":{"operationId":"list_test_runs","summary":"List the recorded runs of one test, newest first, with conclusion, branch, commit sha, CI job and timing. Use for \"Show ","description":"List the recorded runs of one test, newest first, with conclusion, branch, commit sha, CI job and timing. Use for \"Show the latest runs of Trunk test t_8f3k2d9a\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"test_id":{"description":"Trunk test id (opaque, taken from list_tests).","maxLength":120,"title":"Test Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from a previous response's nextCursor.","title":"Cursor"},"conclusion":{"anyOf":[{"enum":["success","failure","skipped"],"type":"string"},{"type":"null"}],"default":null,"description":"Only runs that finished this way.","title":"Conclusion"},"branches":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated branch globs, for example main,release-*.","title":"Branches"},"started_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs started at or after this ISO 8601 time.","title":"Started After"},"started_before":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs started before this ISO 8601 time.","title":"Started Before"}},"required":["test_id"],"title":"list_test_runsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}