---
url: /api/@ufo-soft/caelus-mcp/functions/resultOf.md
---
# Function: resultOf()

> **resultOf**(`outcome`): `object`

Defined in: [packages/mcp/src/mcp.ts:101](https://github.com/ufo-soft/caelus/blob/31cc32fc3d2008e3b0d484d65d10bba2a91a5897/packages/mcp/src/mcp.ts#L101)

An Outcome as a tool result: ok is one text block, failed is the reason marked as an error.
A tool result needs some text, so no data says "ok" where the CLI prints nothing.

## Parameters

### outcome

[`Outcome`](../../caelus/core/type-aliases/Outcome.md)

## Returns

`object`

### \_meta?

> `optional` **\_meta?**: `object`

#### Index Signature

\[`key`: `string`]: `unknown`

#### \_meta.io.modelcontextprotocol/related-task?

> `optional` **io.modelcontextprotocol/related-task?**: `object`

If specified, this request is related to the provided task.

#### \_meta.io.modelcontextprotocol/related-task.taskId

> **taskId**: `string`

#### \_meta.progressToken?

> `optional` **progressToken?**: `string` | `number`

If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.

### content

> **content**: ({ `_meta?`: {\[`key`: `string`]: `unknown`; }; `annotations?`: { `audience?`: (`"user"` | `"assistant"`)\[]; `lastModified?`: `string`; `priority?`: `number`; }; `text`: `string`; `type`: `"text"`; } | { `_meta?`: {\[`key`: `string`]: `unknown`; }; `annotations?`: { `audience?`: (`"user"` | `"assistant"`)\[]; `lastModified?`: `string`; `priority?`: `number`; }; `data`: `string`; `mimeType`: `string`; `type`: `"image"`; } | { `_meta?`: {\[`key`: `string`]: `unknown`; }; `annotations?`: { `audience?`: (`"user"` | `"assistant"`)\[]; `lastModified?`: `string`; `priority?`: `number`; }; `data`: `string`; `mimeType`: `string`; `type`: `"audio"`; } | { `_meta?`: {\[`key`: `string`]: `unknown`; }; `annotations?`: { `audience?`: (`"user"` | `"assistant"`)\[]; `lastModified?`: `string`; `priority?`: `number`; }; `description?`: `string`; `icons?`: `object`\[]; `mimeType?`: `string`; `name`: `string`; `size?`: `number`; `title?`: `string`; `type`: `"resource_link"`; `uri`: `string`; } | { `_meta?`: {\[`key`: `string`]: `unknown`; }; `annotations?`: { `audience?`: (`"user"` | `"assistant"`)\[]; `lastModified?`: `string`; `priority?`: `number`; }; `resource`: { `_meta?`: {\[`key`: `string`]: `unknown`; }; `mimeType?`: `string`; `text`: `string`; `uri`: `string`; } | { `_meta?`: {\[`key`: `string`]: `unknown`; }; `blob`: `string`; `mimeType?`: `string`; `uri`: `string`; }; `type`: `"resource"`; })\[]

### isError?

> `optional` **isError?**: `boolean`

### structuredContent?

> `optional` **structuredContent?**: `object`

#### Index Signature

\[`key`: `string`]: `unknown`
