Skip to content

MCP describe_table_schema doesn't work with CamelCase tables #12764

@ericanderson

Description

@ericanderson

I let Claude Desktop write this for me when we couldn't use my databsae:

Bug Report

Problem

The describe_table_schema tool fails when used with PascalCase table names (common with Prisma-generated schemas), converting them to lowercase and causing "relation does not exist" errors.

Expected Behavior

The tool should properly handle quoted table names like "Product", "User", etc.

Actual Behavior

  • Input: tableName: "Product"
  • Error: relation "product" does not exist
  • The tool appears to convert table names to lowercase regardless of quoting

Reproduction Steps

  1. Create a database with PascalCase table names (e.g., via Prisma)
  2. Use describe_table_schema tool with tableName: "Product"
  3. Observe the error

Environment

  • Database: PostgreSQL 17
  • Project: Neon Serverless
  • Schema generated via: Prisma ORM (PascalCase naming convention)

Workaround

Using direct SQL queries with information_schema.columns works correctly:

SELECT column_name, data_type FROM information_schema.columns 
WHERE table_name = 'Product' AND table_schema = 'public'

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalA PR or Issue is created by an external user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions