Type predicates for every MCP spec type, keyed by type name.
Returns true if the value satisfies the schema's input type (z.input<>, before defaults and
transforms are applied), and narrows to that input type. For schemas with .default() or
.preprocess(), this may accept values that do not structurally match the named output type;
for example isSpecType.CallToolResult({}) is true because content has a default. Use
specTypeSchemas.X['~standard'].validate(value) when you need the validated output value.
Each guard is a standalone function, so it can be passed directly as a callback.
Example
if (isSpecType.ContentBlock(value)) { // value is ContentBlock }
Type predicates for every MCP spec type, keyed by type name.
Returns
trueif the value satisfies the schema's input type (z.input<>, before defaults and transforms are applied), and narrows to that input type. For schemas with.default()or.preprocess(), this may accept values that do not structurally match the named output type; for exampleisSpecType.CallToolResult({})istruebecausecontenthas a default. UsespecTypeSchemas.X['~standard'].validate(value)when you need the validated output value.Each guard is a standalone function, so it can be passed directly as a callback.