Skip to content

MCP-CustomTool: Schema Enhancements and Documentation #3044

@souvikghosh04

Description

@souvikghosh04

Goal: Production-ready type mapping and comprehensive docs

Files to Modify:

DynamicCustomTool.cs
Enhance BuildInputSchema() method
Add SQL type → JSON schema type mapping:
VARCHAR/TEXT → string
INT/BIGINT → integer (with format: int64 for bigint)
DECIMAL/NUMERIC → number
BIT → boolean
DATETIME/DATE → string (with format: date-time)
Add nullable handling (not required if nullable)
Add default value hints in descriptions

Files to Create:
2. src/Azure.DataApiBuilder.Mcp.Tests/ParameterSchemaGenerationTests.cs

Test all SQL type mappings
Required vs optional parameter handling
Default value representation
Nullable type handling
Complex type edge cases
Documentation Updates:
README.md - Add custom tools section with examples
docs/mcp-custom-tools.md - Comprehensive guide
XML comments on all public classes/methods
Configuration schema documentation

Deliverable: Production-ready type system with complete documentation

Metadata

Metadata

Assignees

Labels

mcp-servermssqlan issue thats specific to mssql

Type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions