pi-codemcp 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sidecar/tool_catalog.py +3 -2
package/package.json
CHANGED
package/sidecar/tool_catalog.py
CHANGED
|
@@ -454,6 +454,7 @@ class ToolCatalog(BaseModel):
|
|
|
454
454
|
value,
|
|
455
455
|
mode="json",
|
|
456
456
|
exclude_unset=True,
|
|
457
|
+
by_alias=True,
|
|
457
458
|
)
|
|
458
459
|
)
|
|
459
460
|
if not isinstance(dumped, dict):
|
|
@@ -469,7 +470,7 @@ class ToolCatalog(BaseModel):
|
|
|
469
470
|
raise TypeError(f"{tool_name} is not a saved chain with an output contract")
|
|
470
471
|
validated = spec.output_adapter.validate_python(result)
|
|
471
472
|
return JSON_VALUE_ADAPTER.validate_python(
|
|
472
|
-
spec.output_adapter.dump_python(validated, mode="json")
|
|
473
|
+
spec.output_adapter.dump_python(validated, mode="json", by_alias=True)
|
|
473
474
|
)
|
|
474
475
|
|
|
475
476
|
def normalize_result(self, tool_name: str, result: mcp_types.CallToolResult) -> JsonValue:
|
|
@@ -501,7 +502,7 @@ class ToolCatalog(BaseModel):
|
|
|
501
502
|
else:
|
|
502
503
|
validated = adapter.validate_python(structured)
|
|
503
504
|
normalized = JSON_VALUE_ADAPTER.validate_python(
|
|
504
|
-
adapter.dump_python(validated, mode="json")
|
|
505
|
+
adapter.dump_python(validated, mode="json", by_alias=True)
|
|
505
506
|
)
|
|
506
507
|
if isinstance(normalized, str) and (spec.output_wrap_result or wrap_from_meta):
|
|
507
508
|
return _normalize_text_result(normalized)
|