AgentMessagePart
A request or response body; the type column links to the schemas it refers to.
AgentMessagePart
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | yes | `text` the agent wrote, a `notice` about the turn (why it had no tools, say), a `tool` it called, an `image` it showed the person (with `show_image`, whose call it replaces), or — in a user message — an `attachment` the person sent with it. one of "text" | "notice" | "tool" | "image" | "attachment" |
| text | string | no | A text or notice part's text. |
| tool_call_id | string | no | A tool part's call, or the call that showed an image. |
| tool_name | string | no | — |
| input | any | no | — |
| output | any | no | A tool's result, clipped; images it carried inline are left out. |
| error | string | no | — |
| image | AgentImage | no | — |
| attachment | AgentAttachment | no | — |
jsonExample
{
"type": "text",
"text": "string",
"tool_call_id": "string",
"tool_name": "mcp__lrs__list_learning_records",
"input": null,
"output": null,
"error": "string",
"image": {
"id": "3a7c1e52-9f0b-4c2d-8e61-5b4f0a9d2c18",
"content_type": "image/png",
"width": 1280,
"height": 720,
"alt": "Bar chart of forklift certifications lapsing each month.",
"caption": null,
"url": "string"
},
"attachment": {
"id": "5e0c9a14-7b2d-4c38-9f61-0a3d8e2b7c45",
"file_name": "forklift-certificate.pdf",
"content_type": "application/pdf",
"size_bytes": 482113,
"width": 0,
"height": 0,
"url": "string"
}
}