MCP TypeScript SDK (V2)
    Preparing search index...
    specTypeSchemas: SchemaRecord = ...

    Runtime validators for every MCP spec type, keyed by type name.

    Use this when you need to validate a spec-defined shape at a boundary the SDK does not own, for example an extension's custom-method payload that embeds a CallToolResult, or a value read from storage that should be a Tool.

    Each entry implements the Standard Schema interface, so it composes with any Standard-Schema-aware library. For a simple boolean check, use isSpecType instead.

    const result = specTypeSchemas.CallToolResult['~standard'].validate(untrusted);
    if (result.issues === undefined) {
    // result.value is CallToolResult
    }