---
title: McpReadOutput
description: The output of an `mcp.read` or an `mcp.prompt` Effect.
---

# `McpReadOutput`

Type, in `@jr2/orchestrator/src/effector-wire.ts`. It is an export of `@jr2/orchestrator`, in the [Effects](group-effects.md) group of the [Authoring surface](../authoring-surface.md) page.

```ts
type McpReadOutput =
  | { outcome: "returned"; text: string; structured?: unknown; truncated?: boolean }
  | McpNotReturned;
```

The output of an `mcp.read` or an `mcp.prompt` Effect. Its outcomes are those of
[`McpCallOutput`](type-mcpcalloutput.md), with no `isError`. For a read, `text` joins the text of the resource's
contents, and `structured` is the `contents` list: a blob is given only as its `mimeType` and its
size. For a prompt, `text` joins the text of the prompt's messages, and `structured` is the
`messages` list. Past the bound, `structured` is dropped and `truncated` is set.

**Forms**: it is one of these objects.

- Form 1: `outcome`, `reason`

  - `outcome`: `"refused"`
  - `reason`: `string`
- Form 2: `outcome`, `reason`

  - `outcome`: `"unreachable"`
  - `reason`: `string`
- Form 3: `outcome`, `reason`

  - `outcome`: `"input-required"`
  - `reason`: `string`
- Form 4: `outcome`, `reason`

  - `outcome`: `"unknown"`
  - `reason`: `string`
- Form 5: `outcome`, `text`, `structured`, `truncated`

  - `outcome`: `"returned"`
  - `text`: `string`
  - `structured` (optional): `unknown`
  - `truncated` (optional): `boolean`
- Form 6: `outcome`, `reason`

  - `outcome`: `"(a later outcome)"`
  - `reason` (optional): `string`

**See also**

- [Effects](../../concepts/effects.md)
