{"openapi":"3.1.0","info":{"title":"Codemagic (BYOK) API","version":"0.1.0","description":"Codemagic (BYOK) lets an AI assistant read your own Codemagic data through the Codemagic API with a key you supply (Codemagic API token). Read-only: 12 tools (get_current_user, list_teams, list_my_apps, list_team_apps, list_app_workflows, list_team_builds, get_build, list_build_steps, get_team_build_summary, get_builds_by_status, get_build_duration_percentiles, get_builds_over_time). The BYOK key...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-codemagic.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-codemagic/docs"},"termsOfService":"https://connectorbay.com/byok-codemagic/terms"},"servers":[{"url":"https://byok-codemagic.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-codemagic/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/get_current_user":{"post":{"operationId":"get_current_user","summary":"Show the id and permissions of the Codemagic user the token belongs to. Use for \"Which Codemagic user is my API token fo","description":"Show the id and permissions of the Codemagic user the token belongs to. Use for \"Which Codemagic user is my API token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_current_userArguments","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_teams":{"post":{"operationId":"list_teams","summary":"List the Codemagic teams the token's user belongs to, with team ids needed by the other team tools. Use for \"Which Codem","description":"List the Codemagic teams the token's user belongs to, with team ids needed by the other team tools. Use for \"Which Codemagic teams am I in\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return per page (1 to 100).","title":"Page Size"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_teamsArguments","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_my_apps":{"post":{"operationId":"list_my_apps","summary":"List apps the token's user can see across teams, with the last build id and archived flag; filter by name words. Use for","description":"List apps the token's user can see across teams, with the last build id and archived flag; filter by name words. Use for \"Which of my apps are set up in Codemagic\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return per page (1 to 100).","title":"Page Size"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Words that must all appear in the app name (case-insensitive).","title":"Name"}},"title":"list_my_appsArguments","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_team_apps":{"post":{"operationId":"list_team_apps","summary":"List a team's apps with repository url, project type, settings source and last build id. Use for \"What apps does my Code","description":"List a team's apps with repository url, project type, settings source and last build id. Use for \"What apps does my Codemagic team build\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return per page (1 to 100).","title":"Page Size"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Words that must all appear in the app name (case-insensitive).","title":"Name"}},"required":["team_id"],"title":"list_team_appsArguments","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_app_workflows":{"post":{"operationId":"list_app_workflows","summary":"List the distinct workflows (ids and names) that exist for one app. Use for \"Which workflows does my Codemagic app have\"","description":"List the distinct workflows (ids and names) that exist for one app. Use for \"Which workflows does my Codemagic app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Codemagic app id (from list_team_apps).","maxLength":200,"title":"App Id","type":"string"}},"required":["app_id"],"title":"list_app_workflowsArguments","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_team_builds":{"post":{"operationId":"list_team_builds","summary":"List a team's recent builds, newest first, with status, branch, tag, commit message and timing; filter by app, workflow,","description":"List a team's recent builds, newest first, with status, branch, tag, commit message and timing; filter by app, workflow, branch or status. Use for \"Did the latest builds on main pass in Codemagic\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"app_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this app (id from list_team_apps).","title":"App Id"},"workflow_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this workflow (id from list_app_workflows).","title":"Workflow Id"},"status":{"anyOf":[{"enum":["queued","building","finished","failed","canceled","timeout","skipped"],"type":"string"},{"type":"null"}],"default":null,"description":"Only builds with this status.","title":"Status"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only builds of this branch.","title":"Branch"},"tag":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only builds of this tag.","title":"Tag"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Build id after which to continue, taken from the previous answer's cursor.","title":"Cursor"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many builds to return (1 to 100).","title":"Page Size"}},"required":["team_id"],"title":"list_team_buildsArguments","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_build":{"post":{"operationId":"get_build","summary":"Get one build: status, workflow, branch, commit message, timing, instance type and tool versions. Use for \"How did Codem","description":"Get one build: status, workflow, branch, commit message, timing, instance type and tool versions. Use for \"How did Codemagic build 60a0b1c2d3e4f56789abcdef finish\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"build_id":{"description":"Codemagic build id (from list_team_builds).","maxLength":200,"title":"Build Id","type":"string"}},"required":["build_id"],"title":"get_buildArguments","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_build_steps":{"post":{"operationId":"list_build_steps","summary":"List the steps (actions) a build ran, with type, status and timing, to see where it failed. Use for \"Which step of Codem","description":"List the steps (actions) a build ran, with type, status and timing, to see where it failed. Use for \"Which step of Codemagic build 60a0b1c2d3e4f56789abcdef failed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"build_id":{"description":"Codemagic build id (from list_team_builds).","maxLength":200,"title":"Build Id","type":"string"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return per page (1 to 100).","title":"Page Size"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["build_id"],"title":"list_build_stepsArguments","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_team_build_summary":{"post":{"operationId":"get_team_build_summary","summary":"Summarise a team's build usage in a period: number of builds, total build duration and apps built. Use for \"How many bui","description":"Summarise a team's build usage in a period: number of builds, total build duration and apps built. Use for \"How many builds did my Codemagic team run last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"period_from":{"description":"Start of the period as an ISO 8601 date-time, for example 2026-09-01T00:00:00Z.","maxLength":200,"title":"Period From","type":"string"},"period_to":{"description":"End of the period as an ISO 8601 date-time, for example 2026-10-01T00:00:00Z.","maxLength":200,"title":"Period To","type":"string"}},"required":["team_id","period_from","period_to"],"title":"get_team_build_summaryArguments","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_builds_by_status":{"post":{"operationId":"get_builds_by_status","summary":"Count a team's builds by outcome (finished, failed, canceled, timeout) in a period, with percentages. Use for \"What shar","description":"Count a team's builds by outcome (finished, failed, canceled, timeout) in a period, with percentages. Use for \"What share of my Codemagic builds failed in September\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"period_from":{"description":"Start of the period as an ISO 8601 date-time, for example 2026-09-01T00:00:00Z.","maxLength":200,"title":"Period From","type":"string"},"period_to":{"description":"End of the period as an ISO 8601 date-time, for example 2026-10-01T00:00:00Z.","maxLength":200,"title":"Period To","type":"string"},"app_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this app (id from list_team_apps).","title":"App Id"},"workflow_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this workflow (id from list_app_workflows).","title":"Workflow Id"}},"required":["team_id","period_from","period_to"],"title":"get_builds_by_statusArguments","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_build_duration_percentiles":{"post":{"operationId":"get_build_duration_percentiles","summary":"Show how long builds take (seconds) at the median and other percentiles over a period. Use for \"How long does a typical ","description":"Show how long builds take (seconds) at the median and other percentiles over a period. Use for \"How long does a typical Codemagic build take\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"period_from":{"description":"Start of the period as an ISO 8601 date-time, for example 2026-09-01T00:00:00Z.","maxLength":200,"title":"Period From","type":"string"},"period_to":{"description":"End of the period as an ISO 8601 date-time, for example 2026-10-01T00:00:00Z.","maxLength":200,"title":"Period To","type":"string"},"app_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this app (id from list_team_apps).","title":"App Id"},"workflow_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only include this workflow (id from list_app_workflows).","title":"Workflow Id"}},"required":["team_id","period_from","period_to"],"title":"get_build_duration_percentilesArguments","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_builds_over_time":{"post":{"operationId":"get_builds_over_time","summary":"Get the number of builds per day or week for a team over a period, to chart build activity. Use for \"How many Codemagic ","description":"Get the number of builds per day or week for a team over a period, to chart build activity. Use for \"How many Codemagic builds ran each week in September\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"team_id":{"description":"Codemagic team id (from list_teams).","maxLength":200,"title":"Team Id","type":"string"},"period_from":{"description":"Start of the period as an ISO 8601 date-time, for example 2026-09-01T00:00:00Z.","maxLength":200,"title":"Period From","type":"string"},"period_to":{"description":"End of the period as an ISO 8601 date-time, for example 2026-10-01T00:00:00Z.","maxLength":200,"title":"Period To","type":"string"}},"required":["team_id","period_from","period_to"],"title":"get_builds_over_timeArguments","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}}}}