Skip to content

Fix get_object_details output validation with structured output#6

Merged
dankelleher merged 1 commit intomainfrom
fix/get-object-details-output-validation
Feb 18, 2026
Merged

Fix get_object_details output validation with structured output#6
dankelleher merged 1 commit intomainfrom
fix/get-object-details-output-validation

Conversation

@dankelleher
Copy link
Member

@dankelleher dankelleher commented Feb 18, 2026

Summary

  • keep get_object_details as a structured-output tool
  • return an explicit CallToolResult with structuredContent to avoid injected null optional keys
  • preserve text content output while preventing None is not of type 'string' validation failures
  • add a regression test for output schema and structured content behavior

Validation

  • uv run pytest -q tests/unit/test_tool_schemas.py
  • uv run ruff check src/postgres_mcp/server.py tests/unit/test_tool_schemas.py
  • MCP Inspector CLI calls for get_object_details on public.Account, public.AccountMember, and public.User against read-only DB creds (all isError=false, no output validation errors)

@dankelleher dankelleher merged commit 589b3f7 into main Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant