{"openapi":"3.1.0","info":{"title":"Sourcehut Git (BYOK) API","version":"0.1.0","description":"Sourcehut Git (BYOK) lets an AI assistant read your own Sourcehut Git data through the Sourcehut Git API with a key you supply (SourceHut personal access token (needs PROFILE, REPOSITORIES and OBJECTS read scopes)). Read-only: 8 tools (get_me, list_repositories, get_repository, list_commits, get_commit, list_references, get_user, list_user_repositories). The BYOK key travels with each request, is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-sourcehutgit.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-sourcehutgit/docs"},"termsOfService":"https://connectorbay.com/byok-sourcehutgit/terms"},"servers":[{"url":"https://byok-sourcehutgit.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-sourcehutgit/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, email, URL, location and bio. Use for \"Which ","description":"Show the SourceHut account the token belongs to: username, canonical name, email, URL, location and bio. Use for \"Which SourceHut account is my 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_repositories":{"post":{"operationId":"list_repositories","summary":"List the git repositories you own with name, description, visibility, HEAD branch and dates. Optionally search by text; ","description":"List the git repositories you own with name, description, visibility, HEAD branch and dates. Optionally search by text; page with the returned cursor. Use for \"Which git repositories do I have on SourceHut\".","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"},"count":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of results to return per page.","title":"Count"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search terms to filter repositories by.","title":"Search"}},"title":"list_repositoriesArguments","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_repository":{"post":{"operationId":"get_repository","summary":"Get one repository by resource id: name, description, visibility, owner, HEAD reference and your access level. Use for \"","description":"Get one repository by resource id: name, description, visibility, owner, HEAD reference and your access level. Use for \"Show the SourceHut repository with rid rid-example-1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"rid":{"description":"Repository resource id (the rid field returned by list_repositories).","maxLength":200,"title":"Rid","type":"string"}},"required":["rid"],"title":"get_repositoryArguments","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_commits":{"post":{"operationId":"list_commits","summary":"List recent commits of a repository (like git log), optionally starting from a revision, with id, message, author and co","description":"List recent commits of a repository (like git log), optionally starting from a revision, with id, message, author and committer. Use for \"What are the latest commits in my SourceHut repository rid-example-1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"rid":{"description":"Repository resource id (the rid field returned by list_repositories).","maxLength":200,"title":"Rid","type":"string"},"from_rev":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Revision spec to start the log from (branch, tag or commit id); default is HEAD.","title":"From Rev"},"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":["rid"],"title":"list_commitsArguments","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_commit":{"post":{"operationId":"get_commit","summary":"Get one commit of a repository by revision spec (commit id, branch or tag): message, author, committer and parent commit","description":"Get one commit of a repository by revision spec (commit id, branch or tag): message, author, committer and parent commits. Use for \"Show commit abcdef0 of my SourceHut repository rid-example-1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"rid":{"description":"Repository resource id (the rid field returned by list_repositories).","maxLength":200,"title":"Rid","type":"string"},"revspec":{"description":"Revision spec: commit id, branch name or tag, for example 'main' or 'abcdef0'.","maxLength":200,"title":"Revspec","type":"string"}},"required":["rid","revspec"],"title":"get_commitArguments","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_references":{"post":{"operationId":"list_references","summary":"List the references (branches and tags) of a repository with their target object ids. Use for \"What branches and tags do","description":"List the references (branches and tags) of a repository with their target object ids. Use for \"What branches and tags does my SourceHut repository rid-example-1 have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"rid":{"description":"Repository resource id (the rid field returned by list_repositories).","maxLength":200,"title":"Rid","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":["rid"],"title":"list_referencesArguments","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_user":{"post":{"operationId":"get_user","summary":"Get a SourceHut user's public profile by username: canonical name, URL, location and bio. Use for \"Who is the SourceHut ","description":"Get a SourceHut user's public profile by username: canonical name, URL, location and bio. Use for \"Who is the SourceHut user ddevault\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"SourceHut username without the ~, for example 'ddevault'.","maxLength":100,"title":"Username","type":"string"}},"required":["username"],"title":"get_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_user_repositories":{"post":{"operationId":"list_user_repositories","summary":"List a SourceHut user's repositories you are allowed to see, with name, description, visibility and dates. Use for \"Whic","description":"List a SourceHut user's repositories you are allowed to see, with name, description, visibility and dates. Use for \"Which public git repositories 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"},"count":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of results to return per page.","title":"Count"}},"required":["username"],"title":"list_user_repositoriesArguments","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}}}}