Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/types/src/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,48 @@ export type McpResourceResponse = {
}>
}

/**
* Annotations that can be attached to content items in MCP tool call responses.
* Used to indicate audience targeting, priority, and modification timestamps.
*/
export type McpContentAnnotations = {
audience?: Array<"user" | "assistant">
priority?: number
lastModified?: string
}

export type McpToolCallResponse = {
_meta?: Record<string, any> // eslint-disable-line @typescript-eslint/no-explicit-any
content: Array<
| {
type: "text"
text: string
annotations?: McpContentAnnotations
_meta?: Record<string, unknown>
}
| {
type: "image"
data: string
mimeType: string
annotations?: McpContentAnnotations
_meta?: Record<string, unknown>
}
| {
type: "audio"
data: string
mimeType: string
annotations?: McpContentAnnotations
_meta?: Record<string, unknown>
}
| {
type: "resource_link"
uri: string
name: string
description?: string
mimeType?: string
title?: string
annotations?: McpContentAnnotations
_meta?: Record<string, unknown>
}
| {
type: "resource"
Expand All @@ -123,9 +149,13 @@ export type McpToolCallResponse = {
mimeType?: string
text?: string
blob?: string
_meta?: Record<string, unknown>
}
annotations?: McpContentAnnotations
_meta?: Record<string, unknown>
}
>
structuredContent?: Record<string, unknown>
isError?: boolean
}

Expand Down
Loading
Loading