> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentlinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# context status

> Read this repository's first-party context state: connection grant state (booleans, property names, permission levels and dates only ,  never a token), GSC fact-row count, site-fact count, availability floors and manual-input presence.

`context_status`

Read this repository's first-party context state: connection grant state (booleans, property names, permission levels and dates only ,  never a token), GSC fact-row count, site-fact count, availability floors and manual-input presence. manual\_only is a complete configuration, not an error: with no Google connection the manual inputs are the context.

<Note>Repository-local stdio MCP only. This tool is absent from hosted MCP and HTTP. It reads local context without starting a cloud job.</Note>

## Setup and request

Start the [local context host](/guides/local-context) with an explicit repository root. Paths are restricted to that root, including symlink resolution.

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "context_status",
    "arguments": {}
  }
}
```

## Input fields

This operation accepts an empty object.

## Returned result

Captured from a local fixture repository without external credentials.

```json theme={null}
{
  "project": null,
  "connection": {
    "grant": "none",
    "token_in_env": false
  },
  "handoff": null,
  "availability": {},
  "last_fetch_count": 0,
  "gsc_rows": 0,
  "gsc_file_missing": true,
  "gsc_problems": [],
  "site_fact_rows": 0,
  "manual_present": true,
  "manual_entries": 2
}
```

| Field                                                    | Type           | Presence | Meaning and constraints                                                                                            |
| -------------------------------------------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `project`                                                | object / null  | Required | Customer-owned project configuration; additional user fields remain possible.                                      |
| `project.id`                                             | string         | Optional | Configured project identifier.                                                                                     |
| `project.name`                                           | string         | Optional | Optional project label.                                                                                            |
| `project.site`                                           | string / array | Optional | Customer-declared public site host or hosts.                                                                       |
| `connection`                                             | object         | Required | Sanitized connection metadata. additional fields rejected                                                          |
| `connection.grant`                                       | string         | Required | Current sanitized connection grant state. values: "none", "ok", "refused", "revoked", "token\_present\_unverified" |
| `connection.token_in_env`                                | boolean        | Required | Token presence only; the token is never returned.                                                                  |
| `connection.checked_at`                                  | string         | Optional | Last connection check timestamp.                                                                                   |
| `connection.last_status`                                 | integer        | Optional | Last recorded HTTP status. minimum: 0                                                                              |
| `connection.properties`                                  | array          | Optional | Connected property names.                                                                                          |
| `connection.permission_levels`                           | object         | Optional | Property name to permission level.                                                                                 |
| `handoff`                                                | object / null  | Required | Customer-editable saved handoff state.                                                                             |
| `handoff.connectors`                                     | array          | Optional | Original connector names.                                                                                          |
| `handoff.last_import_at`                                 | string         | Optional | Most recent handoff import timestamp.                                                                              |
| `handoff.rows_imported`                                  | integer        | Optional | Cumulative imported row count. minimum: 0                                                                          |
| `availability`                                           | object         | Required | Property names mapped to saved availability probes.                                                                |
| `availability.&#123;property&#125;.property`             | string         | Optional | Property identifier on a newly probed result.                                                                      |
| `availability.&#123;property&#125;.first_available_date` | string / null  | Required | Calendar date in YYYY-MM-DD form.                                                                                  |
| `availability.&#123;property&#125;.probed_at`            | string         | Required | Probe timestamp.                                                                                                   |
| `availability.&#123;property&#125;.probes_used`          | integer        | Required | Probe calls used. minimum: 0                                                                                       |
| `availability.&#123;property&#125;.basis`                | string         | Required | Evidence or budget reason for the availability floor.                                                              |
| `availability.&#123;property&#125;.cached`               | boolean        | Optional | Whether the saved probe was reused.                                                                                |
| `last_fetch_count`                                       | integer        | Required | Saved request-cache entries. minimum: 0                                                                            |
| `gsc_rows`                                               | integer        | Required | Parsed local GSC rows, including window markers. minimum: 0                                                        |
| `gsc_file_missing`                                       | boolean        | Required | No GSC JSONL file exists.                                                                                          |
| `gsc_problems`                                           | array          | Required | Malformed lines are reported without dropping the diagnostic.                                                      |
| `gsc_problems[].line`                                    | integer        | Required | One-based file line. minimum: 0                                                                                    |
| `gsc_problems[].reason`                                  | string         | Required | JSON parsing failed for this line. must equal "not\_json"                                                          |
| `site_fact_rows`                                         | integer        | Required | Parsed site fact rows. minimum: 0                                                                                  |
| `manual_present`                                         | boolean        | Required | Nonempty manual inputs exist.                                                                                      |
| `manual_entries`                                         | integer        | Required | Manual statements parsed. minimum: 0                                                                               |

Connection status returns only sanitized grant metadata. Project and handoff state remain customer-owned extensible records. Counts include local records, not a promise of fresh Google data.

[Download result schema](/schemas/context_status.output.json).

## Result and recovery

The host returns JSON in both `structuredContent` and text content. The [local context reference](/reference/context/results) describes each result, file ownership and recovery. Start/end dates must be supplied together. Thrown input or file failures return `isError: true`. Missing manual/profile files and unresolved citations also flag an error. Inspect returned connection states separately: revoked or unavailable access can be result data. Manual-only configuration is valid.

See [local context](/guides/local-context), [CLI context commands](/reference/local/index) and [schema conventions](/reference/schemas).
