---
outline: deep
---

# DF0048: Unknown Shared-State Key

## Message

> Unknown shared-state key "`{key}`".

## Cause

The built-in `devframe_state_read` MCP tool was called with a `key` that is not among the shared-state keys the host publishes (or that the `exposeSharedState` filter allows). The error crosses the MCP boundary as structured JSON, so the calling agent can self-correct.

## Example

```ts
// The host publishes only `my-plugin:counter`; an agent calls:
// devframe_state_read({ key: 'my-plugin:cuonter' }) → DF0048
```

## Fix

Call the `devframe_state_read` tool without arguments to list the available keys, then retry with one of them.

## Source

- [`packages/devframe/src/adapters/mcp/build-server.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/adapters/mcp/build-server.ts) — `readStateResult()` throws this when the requested key is absent from the filtered key list.
