Skip to content
echogeco
Building an MCP server · Surface and auth

The server that exposes run_query

Find the defects that cost most in a contractor's three-tool MCP server over the order database, size one bad call, and say what ships instead.

critiqueeasyExercise · 3 min · 51 of 75
On this page

A contractor's server passes every test it was given. The tests checked answers, and none of them checked what the server refuses.

The situation

A contractor delivers an MCP server over your order database for the support desk: the online retailer's from this module, not the agency. It has three tools: run_query(sql), get_schema() and send_email(to, subject, body). It runs over HTTP. Every caller connects with the same bearer token, and the server reaches Postgres as app_rw, the application's read-write user. Its log is one line per call: query ok.

The database holds 180,000 customers and 1.2 million orders. Twelve agents, two leads and the triage automation would use the server, about 6,000 calls a day. The contractor's case is that one query tool answers any question, and that it passed 20 of 20 test questions such as "how many orders did customer 4471 place this year?"

Assume a customer row is about 200 bytes, a token is roughly 4 characters, and the window is 200k tokens.

The question

Find the three defects that would cost the most, and say what you would ship in place of this server.

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open