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:
Type schema for Claude function calling.
IClaudeSchemadefines the type schema format for Claude function calling.IClaudeSchemaappears 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,IClaudeSchemais 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,
IClaudeSchemadoes not follow the entire OpenAPI v3.1 specification. It has specific restrictions and definitions. Here are the differences betweenILlmSchemaV3_1and the OpenAPI v3.1 JSON schema:Compared to OpenApi.IJsonSchema, the emended JSON schema specification:
For reference, if you compose the
IClaudeSchematype with the IClaudeSchema.IConfig.referencefalseoption (default isfalse), only recursively named types will be archived into the IClaudeSchema.IParameters.$defs, and others will be escaped from the IClaudeSchema.IReference type.