# check\_forges

Check that each connected forge still accepts its credential, and record the result on the connection.

writes · not idempotent · MCP tool · [Forge](https://komrad.dev/latest/api/forge.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.forge.v1.ForgeService/CheckForges \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```bash
komrad rpc check-forges
```

```json
{
  "name": "check_forges",
  "arguments": {}
}
```

Offered by the komrad MCP server to orchestrator agents.

## Request

### Empty

No fields.

## Response

### CheckForgesResponse

| Field | Type | Description |
| --- | --- | --- |
| [`checks`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-CheckForgesResponse-checks) | [ForgeCheck\[\]](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ForgeCheck) | One check for each connection, in the order [`list_forges`](https://komrad.dev/latest/api/forge/list-forges.md) returns them. |

## Types

### ForgeCheck

ForgeCheck is what one forge said about komrad's credential.

| Field | Type | Description |
| --- | --- | --- |
| [`forge`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ForgeCheck-forge) | [Forge](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge) | The connection checked. |
| [`problem`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ForgeCheck-problem) | string | What the forge said was wrong. Empty when the forge accepted the credential. |
| [`problem_kind`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ForgeCheck-problem_kind) | [ProblemKind](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ProblemKind) | The kind of problem. Unspecified when there is none. |

### Forge

Forge is komrad's connection to one forge host and the credential komrad uses there.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-id) | uuid\* | The connection's id. |
| [`kind`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-kind) | [Kind](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Kind) | The kind of forge the host runs. |
| [`host`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-host) | string | The host that git remotes name, such as `github.com`. |
| [`api_url`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-api_url) | string | The address of an enterprise host's API. Empty for the public forge. |
| [`method`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-method) | [CredentialMethod](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-CredentialMethod) | How the credential was given. |
| [`login`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-login) | string | The account the forge says the credential belongs to, a user login or an App's name. |
| [`verified_at`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-verified_at) | timestamp | When the forge last accepted the credential. Unset once the forge refuses it. |
| [`has_credential`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-has_credential) | bool | Whether this machine still has the credential. A `token` connection needs its token file, and a `github_app` connection always has its credential. |
| [`created_at`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Forge-created_at) | timestamp | When the connection was created. |

### ProblemKind

ProblemKind is the kind of problem a check found with a forge connection.

| Value | Description |
| --- | --- |
| [`refused`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ProblemKind-refused) | The forge refused the credential. |
| [`no-credential`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ProblemKind-no-credential) | This machine no longer has the credential. |
| [`unreachable`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-ProblemKind-unreachable) | The forge could not be reached. |

### Kind

Kind is the kind of forge a host runs.

| Value | Description |
| --- | --- |
| [`github`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Kind-github) | GitHub, or a GitHub Enterprise host. |
| [`gitlab`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-Kind-gitlab) | GitLab, or a self-managed GitLab host. |

### CredentialMethod

CredentialMethod is how a forge connection's credential is given.

| Value | Description |
| --- | --- |
| [`token`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-CredentialMethod-token) | A token the person supplied. |
| [`rotating-token`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-CredentialMethod-rotating-token) | A GitLab token that komrad rotates before it expires. |
| [`github-app`](https://komrad.dev/latest/api/forge/check-forges.md#komrad-forge-v1-CredentialMethod-github-app) | A token minted from the GitHub App in the server's config. |
