{"openapi":"3.1.0","info":{"title":"GitHub API Insights (BYOK) API","version":"0.1.0","description":"GitHub API Insights (BYOK) lets an AI assistant read your own GitHub API Insights data through the GitHub API Insights API with a key you supply (personal access token (organization owner)). Read-only: 8 tools (get_summary_stats, get_summary_stats_by_actor, get_summary_stats_by_user, get_time_stats, get_time_stats_by_actor, get_subject_stats, get_user_stats, get_route_stats_by_actor). The BYOK...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-github-api-insights.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-github-api-insights/docs"},"termsOfService":"https://connectorbay.com/byok-github-api-insights/terms"},"servers":[{"url":"https://byok-github-api-insights.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-github-api-insights/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_summary_stats":{"post":{"operationId":"get_summary_stats","summary":"Get the total number of API requests and rate-limited requests of an organization in a period. Use for \"How many GitHub ","description":"Get the total number of API requests and rate-limited requests of an organization in a period. Use for \"How many GitHub API requests did octo-org make in October\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"}},"required":["org","min_timestamp"],"title":"get_summary_statsArguments","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_summary_stats_by_actor":{"post":{"operationId":"get_summary_stats_by_actor","summary":"Get total and rate-limited API request counts of one actor (token, app installation or OAuth app) in a period. Use for \"","description":"Get total and rate-limited API request counts of one actor (token, app installation or OAuth app) in a period. Use for \"How many API requests did fine-grained token 1234 make for octo-org this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"actor_type":{"description":"Kind of actor: installation, classic_pat, fine_grained_pat, oauth_app or github_app_user_to_server.","enum":["installation","classic_pat","fine_grained_pat","oauth_app","github_app_user_to_server"],"title":"Actor Type","type":"string"},"actor_id":{"description":"Numeric id of the actor (from the subject or user stats lists).","minimum":1,"title":"Actor Id","type":"integer"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"}},"required":["org","actor_type","actor_id","min_timestamp"],"title":"get_summary_stats_by_actorArguments","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_summary_stats_by_user":{"post":{"operationId":"get_summary_stats_by_user","summary":"Get total and rate-limited API request counts of one organization member in a period. Use for \"How many API requests did","description":"Get total and rate-limited API request counts of one organization member in a period. Use for \"How many API requests did user 583231 make for octo-org this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"user_id":{"description":"Numeric GitHub user id (or the user's login) of the member.","maxLength":60,"title":"User Id","type":"string"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"}},"required":["org","user_id","min_timestamp"],"title":"get_summary_stats_by_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/get_time_stats":{"post":{"operationId":"get_time_stats","summary":"Get an organization's API request counts broken down into time buckets (5m, 1h, 1d ...). Use for \"Show hourly GitHub API","description":"Get an organization's API request counts broken down into time buckets (5m, 1h, 1d ...). Use for \"Show hourly GitHub API request counts for octo-org over the last day\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"timestamp_increment":{"description":"Bucket size such as 5m, 10m, 1h or 1d.","maxLength":10,"title":"Timestamp Increment","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"}},"required":["org","min_timestamp","timestamp_increment"],"title":"get_time_statsArguments","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_time_stats_by_actor":{"post":{"operationId":"get_time_stats_by_actor","summary":"Get one actor's API request counts broken down into time buckets. Use for \"Show hourly API request counts of fine-graine","description":"Get one actor's API request counts broken down into time buckets. Use for \"Show hourly API request counts of fine-grained token 1234 in octo-org\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"actor_type":{"description":"Kind of actor: installation, classic_pat, fine_grained_pat, oauth_app or github_app_user_to_server.","enum":["installation","classic_pat","fine_grained_pat","oauth_app","github_app_user_to_server"],"title":"Actor Type","type":"string"},"actor_id":{"description":"Numeric id of the actor (from the subject or user stats lists).","minimum":1,"title":"Actor Id","type":"integer"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"timestamp_increment":{"description":"Bucket size such as 5m, 10m, 1h or 1d.","maxLength":10,"title":"Timestamp Increment","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"}},"required":["org","actor_type","actor_id","min_timestamp","timestamp_increment"],"title":"get_time_stats_by_actorArguments","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_subject_stats":{"post":{"operationId":"get_subject_stats","summary":"List the subjects (repositories, users or other targets) that received API requests in an organization, with request and","description":"List the subjects (repositories, users or other targets) that received API requests in an organization, with request and rate-limit counts. Use for \"Which targets received the most GitHub API requests in octo-org this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"},"direction":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction: asc or desc.","title":"Direction"},"subject_name_substring":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only subjects whose name contains this text (case-insensitive).","title":"Subject Name Substring"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many rows per page (1 to 100).","title":"Per Page"}},"required":["org","min_timestamp"],"title":"get_subject_statsArguments","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_stats":{"post":{"operationId":"get_user_stats","summary":"List the actors (tokens, apps) a member used to call the API in an organization, with request and rate-limit counts. Use","description":"List the actors (tokens, apps) a member used to call the API in an organization, with request and rate-limit counts. Use for \"Which tokens did user 583231 use against octo-org this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"user_id":{"description":"Numeric GitHub user id (or the user's login) of the member.","maxLength":60,"title":"User Id","type":"string"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"},"direction":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction: asc or desc.","title":"Direction"},"actor_name_substring":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only actors whose name contains this text (case-insensitive).","title":"Actor Name Substring"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many rows per page (1 to 100).","title":"Per Page"}},"required":["org","user_id","min_timestamp"],"title":"get_user_statsArguments","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_route_stats_by_actor":{"post":{"operationId":"get_route_stats_by_actor","summary":"List the API routes one actor called in an organization, with request and rate-limit counts per route. Use for \"Which AP","description":"List the API routes one actor called in an organization, with request and rate-limit counts per route. Use for \"Which API routes does fine-grained token 1234 call most in octo-org\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"actor_type":{"description":"Kind of actor: installation, classic_pat, fine_grained_pat, oauth_app or github_app_user_to_server.","enum":["installation","classic_pat","fine_grained_pat","oauth_app","github_app_user_to_server"],"title":"Actor Type","type":"string"},"actor_id":{"description":"Numeric id of the actor (from the subject or user stats lists).","minimum":1,"title":"Actor Id","type":"integer"},"min_timestamp":{"description":"Start of the period, ISO 8601 UTC such as 2026-10-01T00:00:00Z.","maxLength":30,"title":"Min Timestamp","type":"string"},"max_timestamp":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 UTC (default: now).","title":"Max Timestamp"},"direction":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction: asc or desc.","title":"Direction"},"api_route_substring":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only routes containing this text (case-insensitive), for example '/repos'.","title":"Api Route Substring"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many rows per page (1 to 100).","title":"Per Page"}},"required":["org","actor_type","actor_id","min_timestamp"],"title":"get_route_stats_by_actorArguments","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}}}}