63
*/
64
export function elicitationResponseFromAnswers(
66
>
response: ChatInputResponseKind,
67
>
answers: Record<string, ChatInputAnswer> | undefined,
68
>
): McpServerElicitationRequestResponse {
69
>
if (response === ChatInputResponseKind.Decline) {
70
return { action: 'decline', content: null, _meta: null };
71
}
73
return { action: 'cancel', content: null, _meta: null };
74
}
76
// `url` and `openai/form` acceptances carry no projected content.
77
return { action: 'accept', content: null, _meta: null };