- Whose credentials are being used?
- What can those credentials do?
- What stops it from running a DELETE query?

- Left: the function-tool version — a handwritten function called
getCustomerthat embeds a parameterized SQL query. - Right: the MCP version — an MCP toolbox where the model writes its own SQL and calls an “execute SQL” tool.
CUS0003115). Both returned five. Example SQL forms used:

Deep dive on each dimension
- Who writes the SQL?
- Function tools: you author the SQL. You choose columns, joins, and filters, and you can validate the query before the model ever sees it.
- MCP: the model composes SQL on every request, so the exact SQL varies with prompts and context.
- Flexibility
- Function tools: fixed surface area. To answer new questions (e.g., “which 5 accounts dropped fastest?”) you must implement additional queries.
- MCP: flexible. The model can synthesize novel queries in response to ad-hoc questions without code changes.
- Safety (Marcus’s primary concern)
- Function tools: tight and auditable. Parameterized queries treat user input as data, preventing the model (or an attacker) from changing query structure.
- MCP: broad and harder to contain. An
execute_sqltool could run any SQL the model outputs, so you must introduce guardrails and policy enforcement.
Best practice: use parameterized queries and least-privilege credentials to minimize risk. Parameterization prevents SQL injection and makes it trivial to audit which statements the system can run.
- Setup and operational complexity
- Function tools: low friction. Implement a function in
Python(or your language of choice), install a dependency or two, and deploy. - MCP: requires an MCP server/toolbox, a defined protocol, and additional deployment/monitoring work.
- Reuse and scale
- Function tools: reuse is at the code level (copy, import, or publish a package).
- MCP: built for cross-client reuse — one toolbox can serve multiple agents and use cases.
- If your top priority is safety, auditability, and minimal blast radius: prefer function tools with parameterized queries and least-privilege credentials.
- If you need broad, exploratory capability and are willing to invest in guardrails, auditing, and runtime controls: MCP gives you the flexibility to ask new questions without code changes.