Skip to content

Commit bd86c21

Browse files
committed
docs: Add documentation for jsonSchemaSpec configuration option
- Add section explaining jsonSchemaSpec option in Server documentation - Document supported values (jsonSchema7, openApi3, etc.) - Explain use case for OpenAI compatibility - Provide usage examples
1 parent 094a38a commit bd86c21

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,27 @@ const server = new McpServer({
117117
});
118118
```
119119

120+
#### JSON Schema Specification
121+
122+
You can configure the JSON Schema target specification for better compatibility with different systems, particularly OpenAI endpoints:
123+
124+
```typescript
125+
const server = new McpServer({
126+
name: "my-app",
127+
version: "1.0.0"
128+
}, {
129+
jsonSchemaSpec: 'openApi3' // For OpenAI compatibility
130+
});
131+
```
132+
133+
Supported values include:
134+
- `'jsonSchema7'` (default) - JSON Schema Draft 7
135+
- `'openApi3'` - OpenAPI 3.0 specification (recommended for OpenAI compatibility)
136+
- `'jsonSchema4'` - JSON Schema Draft 4
137+
- `'jsonSchema2019-09'` - JSON Schema Draft 2019-09
138+
139+
This setting affects how tool input schemas are generated from Zod schemas, ensuring they match the expected format for your target system.
140+
120141
### Resources
121142

122143
Resources are how you expose data to LLMs. They're similar to GET endpoints in a REST API - they provide data but shouldn't perform significant computation or have side effects:

0 commit comments

Comments
 (0)