Editorial desk with abstract AI data visualizations and research notes

AI Learning Ramp

Tool use and MCP for governed analytics agents.

Course 8 is a one-hour systems session on designing tool schemas, execution loops, and MCP boundaries for a BigQuery copilot that can query safely without turning every external call into hidden model magic.

Course 8 of 24 Published June 12, 2026 Focus: tool use and MCP Target: OpenAI / Anthropic interviews

System-Design Frame

Assume the BigQuery copilot can inspect datasets, fetch lineage, run dry-run estimates, execute approved SQL, create charts, and open tickets. The interview question is how you expose those capabilities as constrained tools: clear JSON contracts, least-privilege credentials, idempotent execution, observable receipts, retry policy, and MCP servers that do not leak authority across tenants or tool calls.

Course 8: Tool Use And MCP

One-hour objective: design a safe tool layer for an AI analytics agent and explain how OpenAI/Anthropic-style tool calls relate to MCP server tools, auth, retries, and sandboxed execution.

Write the tool contract checklist.

For one BigQuery tool, list purpose, JSON schema, caller identity, allowed side effects, timeout, retry rule, cost guard, and audit receipt.

Study OpenAI function calling.

Focus on tool definitions, structured arguments, strict schemas, parallel calls, and how the application remains responsible for executing the tool and returning results.

Compare Anthropic's tool-use loop.

Track the model-request cycle: the model requests a tool, the client executes it, and tool results are sent back for the next model turn.

Map MCP tools to an infra boundary.

Read the MCP tools spec for discovery, input schemas, optional output schemas, tool-call responses, and error reporting between clients and servers.

Design guardrails around execution.

Assign auth, sandboxing, retry caps, idempotency keys, dry-run gates, and human approval to the tools that can read data, spend money, or mutate state.

Deliver the interview synthesis.

Explain why the model chooses or requests tools, but the product still owns execution policy, credentials, observability, cost control, and incident recovery.

Course 8 Reading List

Use three required sources: one OpenAI tool-calling guide, one Anthropic tool-use guide, and the MCP tools specification. Keep the optional refresher for authorization only.

Required

OpenAI: Function Calling

Official guidance for defining tools, producing structured arguments, using strict schemas, handling parallel tool calls, and routing model-selected calls back through application code.

Read for: the concrete schema and execution-loop vocabulary needed to discuss tool use in OpenAI-style systems.

Required

Anthropic: Tool Use Overview

Anthropic's tool-use model for extending Claude with client tools and server tools, including when tools fit and how tool choice changes an agentic application.

Read for: the product boundary between model reasoning, client-side execution, and remotely hosted tools.

Required

Model Context Protocol: Tools

The core MCP tools specification: listing available tools, input schemas, optional output schemas, tool invocation, tool results, error handling, and safety considerations.

Read for: how to turn individual function calls into a protocol boundary for tool discovery and execution.

Optional Refresher

Model Context Protocol: Authorization

A focused refresher on MCP authorization for HTTP-based servers when credentials, tenant isolation, and tool access policy matter.

Skim for: the auth vocabulary to separate transport/session authorization from per-tool business authorization.

Readiness Checklist

You are ready for the interview version of this topic when you can design a tool interface and defend the operational controls around it.

Interview Drill: AI Infra System Design

Prompt: design a tool and MCP layer for a BigQuery analytics agent that can inspect schema, estimate query cost, run approved SQL, summarize results, and escalate risky requests.

Sources

  1. OpenAI: Function Calling
  2. Anthropic: Tool Use Overview
  3. Model Context Protocol: Tools
  4. Model Context Protocol: Authorization