@microsoft/teams.api
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t
48 lines (45 loc) • 1.6 kB
TypeScript
import { IMcpUiCallToolResultContent } from './call-tool-result.js';
/**
* A content block in an MCP UI update-model-context request.
* This reuses the same content union as {@link IMcpUiCallToolResult},
* as defined by the MCP Apps (ext-apps) specification.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsHtmlWidget
*/
type IMcpUiContentBlock = IMcpUiCallToolResultContent;
/**
* The parameters of an MCP UI `ui/update-model-context` request.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsHtmlWidget
*/
interface IMcpUiUpdateModelContextParams {
/**
* An array of content blocks the widget wants to add to the model context.
*/
content?: IMcpUiContentBlock[];
/**
* Structured data the widget wants to add to the model context.
*/
structuredContent?: Record<string, unknown>;
}
/**
* A widget's request to update the model context, delivered on the
* `value` of a message activity (reusing the messageBack mechanism,
* fire-and-forget). Defined by the MCP Apps (ext-apps) specification.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsHtmlWidget
*/
interface IMcpUiUpdateModelContextRequest {
/**
* The MCP method discriminator.
*/
method: 'ui/update-model-context';
/**
* The request parameters.
*/
params: IMcpUiUpdateModelContextParams;
}
export type { IMcpUiContentBlock, IMcpUiUpdateModelContextParams, IMcpUiUpdateModelContextRequest };