gave claude read only access to our postgres. it said status_cd 4 means "cancelled". it means refunded
I set up a Postgres MCP server on a read only role last week so the analysts could ask questions without pinging me every hour.
The first real question was how many orders did we lose last month. Claude looked at orders, saw status_cd with values 1 to 6, decided 4 was cancelled and gave a clean number with a nice little breakdown. 4 is refunded. Cancelled is 6. Nobody wrote that down anywhere. It lives in an enum in the app code and in my head.
The number was off by about a third and it read exactly like a right answer. No I'm assuming, no hedge. The analyst was about to put it in a deck.
So now I'm stuck on how to give an agent the meaning of fields without me turning into a full time documentation service:
- Comments on the columns in Postgres and hope the server passes them through
- A markdown data dictionary in the system prompt
- A view layer with human names on everything
- Make the agent ask before it interprets any code column
What are people actually doing here? and has anyone got it to say I don't know what 4 means instead of picking one?