Type Alias IClaudeSchema

Type schema for Claude function calling.

IClaudeSchema defines the type schema format for Claude function calling.

IClaudeSchema appears to fully support the JSON schema definition of the OpenAPI v3.1 specification; OpenApiV3_1.IJsonSchema. However, since OpenApiV3_1.IJsonSchema has many ambiguous and duplicated expressions, IClaudeSchema is designed to be clear and simple for Claude function calling by utilizing ILlmSchemaV3_1, which has been transformed from OpenApi.IJsonSchema for convenience and clarity.

Therefore, IClaudeSchema does not follow the entire OpenAPI v3.1 specification. It has specific restrictions and definitions. Here are the differences between ILlmSchemaV3_1 and the OpenAPI v3.1 JSON schema:

Compared to OpenApi.IJsonSchema, the emended JSON schema specification:

For reference, if you compose the IClaudeSchema type with the IClaudeSchema.IConfig.reference false option (default is false), only recursively named types will be archived into the IClaudeSchema.IParameters.$defs, and others will be escaped from the IClaudeSchema.IReference type.