{"openapi":"3.1.0","info":{"title":"HCP Terraform (BYOK) API","version":"0.1.0","description":"HCP Terraform (BYOK) lets an AI assistant read your own HCP Terraform data through the HCP Terraform API with a key you supply (user, team or organization API token). Read-only: 7 tools (list_organizations, get_organization, list_projects, list_workspaces, get_workspace, list_workspace_runs, get_run). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-terraformcloud.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-terraformcloud/docs"},"termsOfService":"https://connectorbay.com/byok-terraformcloud/terms"},"servers":[{"url":"https://byok-terraformcloud.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-terraformcloud/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_organizations":{"post":{"operationId":"list_organizations","summary":"List the HCP Terraform organizations the token can see with name, creation date and plan flags. Use for \"Which HCP Terra","description":"List the HCP Terraform organizations the token can see with name, creation date and plan flags. Use for \"Which HCP Terraform organizations can I access\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100, default 20).","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Number"}},"title":"list_organizationsArguments","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_organization":{"post":{"operationId":"get_organization","summary":"Get one HCP Terraform organization: plan flags, default execution mode, SAML and cost estimation settings. Use for \"Show","description":"Get one HCP Terraform organization: plan flags, default execution mode, SAML and cost estimation settings. Use for \"Show settings of my HCP Terraform organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"HCP Terraform organization name, as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"}},"required":["organization"],"title":"get_organizationArguments","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_projects":{"post":{"operationId":"list_projects","summary":"List projects of an HCP Terraform organization with workspace and team counts. Use for \"What projects exist in my HCP Te","description":"List projects of an HCP Terraform organization with workspace and team counts. Use for \"What projects exist in my HCP Terraform organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"HCP Terraform organization name, as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only projects whose name matches this text (case-insensitive).","title":"Search"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100, default 20).","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Number"}},"required":["organization"],"title":"list_projectsArguments","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_workspaces":{"post":{"operationId":"list_workspaces","summary":"List workspaces of an HCP Terraform organization with execution mode, Terraform version, lock state, resource count and ","description":"List workspaces of an HCP Terraform organization with execution mode, Terraform version, lock state, resource count and last change. Use for \"Which HCP Terraform workspaces are locked or failing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"HCP Terraform organization name, as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"search_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only workspaces whose name fuzzy-matches this text.","title":"Search Name"},"search_tags":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only workspaces with all of these comma-separated tags.","title":"Search Tags"},"sort":{"anyOf":[{"enum":["name","-name","current-run.created-at","-current-run.created-at","latest-change-at","-latest-change-at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort by name, current-run.created-at or latest-change-at; prefix with - to reverse.","title":"Sort"},"project_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only workspaces in this project id (prj-...).","title":"Project Id"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100, default 20).","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Number"}},"required":["organization"],"title":"list_workspacesArguments","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_workspace":{"post":{"operationId":"get_workspace","summary":"Get one HCP Terraform workspace by organization and name: settings, lock state, resource count, Terraform version and cu","description":"Get one HCP Terraform workspace by organization and name: settings, lock state, resource count, Terraform version and current run id. Use for \"Show details of an HCP Terraform workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"HCP Terraform organization name, as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"name":{"description":"Workspace name (letters, numbers, - and _).","maxLength":100,"title":"Name","type":"string"}},"required":["organization","name"],"title":"get_workspaceArguments","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_workspace_runs":{"post":{"operationId":"list_workspace_runs","summary":"List runs of an HCP Terraform workspace (newest first) with status, message, source, trigger reason and timestamps. Plan","description":"List runs of an HCP Terraform workspace (newest first) with status, message, source, trigger reason and timestamps. Plan-only runs are excluded unless filtered in. Use for \"What were the latest runs in my HCP Terraform workspace and did they succeed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_id":{"description":"Workspace id (ws-...), as returned by list_workspaces.","maxLength":60,"title":"Workspace Id","type":"string"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated run statuses to include, for example 'errored,applied'.","title":"Status"},"operation":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated run operations to include; list all of them to also see plan-only runs.","title":"Operation"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100, default 20).","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Number"}},"required":["workspace_id"],"title":"list_workspace_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}},"/v1/tools/get_run":{"post":{"operationId":"get_run","summary":"Get one HCP Terraform run by id: status, message, source, trigger reason, destroy and plan-only flags and timestamps. Us","description":"Get one HCP Terraform run by id: status, message, source, trigger reason, destroy and plan-only flags and timestamps. Use for \"What is the status of HCP Terraform run run-CZcmD7eagjhyX0vN\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"run_id":{"description":"Run id (run-...), as returned by list_workspace_runs.","maxLength":60,"title":"Run Id","type":"string"}},"required":["run_id"],"title":"get_runArguments","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}}}}