-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
🐛 Issue Description
During testing of the PNCP gov br MCP integration, several tools are returning an invalid_type: structuredContent null error. The integration works partially - some tools succeed while others fail with schema validation errors.
📊 Test Results Summary
- Success Rate: 2 out of 7 tools (28.5%)
- Failure Rate: 5 out of 7 tools (71.5%)
✅ Working Tools
PNCP-ListPriceRegistrationRecords- Successfully returned 499,649 recordsPNCP-GetProcurementDetails- Successfully retrieved procurement details
❌ Failing Tools
-
PNCP-SearchPublicContracts- Error:invalid_type: structuredContent null -
PNCP-ListProcurementswithOpenProposals- Error:invalid_type: structuredContent null -
PNCP-ListContracts- Error:invalid_type: structuredContent null -
PNCP-ListProcurementsbyPublicationDate- Error:invalid_type: structuredContent null -
PNCP-ListPublicContracts(if exists) - Error:invalid_type: structuredContent null
🔍 Error Details
{
"error": "MCP error -32603: [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": ["structuredContent"],
"message": "Expected object, received null"
}
]"
}🎯 Root Cause Analysis
The issue appears to be related to:
- MCP schema validation for the
structuredContentfield - Possible inconsistency between input parameters and expected schema
- Potential missing authentication or authorization requirements for some endpoints
📝 Steps to Reproduce
// This fails
await CALL_TOOL("PNCP-SearchPublicContracts", {
status: "recebendo_proposta",
q: "tecnologia"
});
// This works
await CALL_TOOL("PNCP-ListPriceRegistrationRecords", {
dataInicial: "20251001",
dataFinal: "20251231"
});🔧 Suggested Solution
- Review the MCP schema definitions for failing tools
- Verify the
structuredContentfield is properly initialized - Check if parameter validation is too strict
- Test endpoint authentication/authorization requirements
- Ensure response transformation is working correctly
📦 Environment
- Integration ID:
i:c95dc4ff-bc3c-48b8-8d2b-5cd43be07ba1 - Integration Name: PNCP gov br
- Test Date: 2025-01-07