(
uri: string,
data: T,
meta: Record<string, any> = {}
)
| 115 | * Create a resource success response object |
| 116 | */ |
| 117 | export function createResourceSuccessResponse<T>( |
| 118 | uri: string, |
| 119 | data: T, |
| 120 | meta: Record<string, any> = {} |
| 121 | ) { |
| 122 | return { |
| 123 | contents: [ |
| 124 | { |
| 125 | uri, |
| 126 | text: JSON.stringify(formatSuccessResponse(data, meta), bigIntReplacer, 2), |
| 127 | mimeType: "application/json", |
| 128 | }, |
| 129 | ], |
| 130 | }; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Format a successful prompt response in the MCP format |
nothing calls this directly
no test coverage detected