{"openapi":"3.1.0","info":{"title":"Sourcehut Builds (BYOK) API","version":"0.1.0","description":"Sourcehut Builds (BYOK) lets an AI assistant read your own Sourcehut Builds data through the Sourcehut Builds API with a key you supply (SourceHut personal access token (needs PROFILE and JOBS read scopes)). Read-only: 7 tools (get_me, list_jobs, get_job, list_job_tasks, get_job_log, list_job_artifacts, list_user_jobs). The BYOK key travels with each request, is used for that one call only and is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-sourcehutbuilds.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-sourcehutbuilds/docs"},"termsOfService":"https://connectorbay.com/byok-sourcehutbuilds/terms"},"servers":[{"url":"https://byok-sourcehutbuilds.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-sourcehutbuilds/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_me":{"post":{"operationId":"get_me","summary":"Show the SourceHut account the token belongs to: username, canonical name, URL, location and bio. Use for \"Which SourceH","description":"Show the SourceHut account the token belongs to: username, canonical name, URL, location and bio. Use for \"Which SourceHut account is my builds token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_meArguments","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_jobs":{"post":{"operationId":"list_jobs","summary":"List your most recent build jobs (newest first) with status, note, tags, image and runner; page with the returned cursor","description":"List your most recent build jobs (newest first) with status, note, tags, image and runner; page with the returned cursor. Use for \"What are my latest SourceHut builds and did they pass\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the cursor value from the previous answer, to get the next page. Leave empty for the first page.","title":"Cursor"}},"title":"list_jobsArguments","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_job":{"post":{"operationId":"get_job","summary":"Get one build job by id: status, note, tags, visibility, image, runner and dates. Use for \"Show SourceHut build job 1234","description":"Get one build job by id: status, note, tags, visibility, image, runner and dates. Use for \"Show SourceHut build job 1234\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric build job id (the id field returned by list_jobs).","minimum":1,"title":"Job Id","type":"integer"}},"required":["job_id"],"title":"get_jobArguments","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_job_tasks":{"post":{"operationId":"list_job_tasks","summary":"List the tasks (steps) of a build job with their status and last update time, to see which step failed. Use for \"Which s","description":"List the tasks (steps) of a build job with their status and last update time, to see which step failed. Use for \"Which step of SourceHut build 1234 failed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric build job id (the id field returned by list_jobs).","minimum":1,"title":"Job Id","type":"integer"}},"required":["job_id"],"title":"list_job_tasksArguments","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_job_log":{"post":{"operationId":"get_job_log","summary":"Get the build log of a job: the last 128 KiB of the main log and the URL of the full log. Use for \"Show the log of Sourc","description":"Get the build log of a job: the last 128 KiB of the main log and the URL of the full log. Use for \"Show the log of SourceHut build job 1234\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric build job id (the id field returned by list_jobs).","minimum":1,"title":"Job Id","type":"integer"}},"required":["job_id"],"title":"get_job_logArguments","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_job_artifacts":{"post":{"operationId":"list_job_artifacts","summary":"List the artifacts a build job produced with path, size and a download URL when available. Use for \"What files did Sourc","description":"List the artifacts a build job produced with path, size and a download URL when available. Use for \"What files did SourceHut build 1234 produce\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Numeric build job id (the id field returned by list_jobs).","minimum":1,"title":"Job Id","type":"integer"}},"required":["job_id"],"title":"list_job_artifactsArguments","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_user_jobs":{"post":{"operationId":"list_user_jobs","summary":"List the build jobs of another SourceHut user that you are allowed to see, newest first. Use for \"Which public builds do","description":"List the build jobs of another SourceHut user that you are allowed to see, newest first. Use for \"Which public builds does SourceHut user ddevault have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"SourceHut username without the ~.","maxLength":100,"title":"Username","type":"string"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the cursor value from the previous answer, to get the next page. Leave empty for the first page.","title":"Cursor"}},"required":["username"],"title":"list_user_jobsArguments","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}}}}