MCP vs function calling vs CLI vs skills for AI agents

Use function calling when one application exposes a small typed tool set to one model API. Use Model Context Protocol (MCP) when several compatible clients should discover and call a reusable server. Use a command-line interface (CLI) when a stable command already exists and text or files are suitable inputs and outputs. Use a skill when reusable instructions, scripts, and references should teach an agent how to perform a workflow.

You can combine these interfaces. A skill may tell an agent when to call an MCP tool. That server may run an existing CLI, while the model selects the operation through function calling. The application must validate the arguments and check the user’s permission on the target resource before execution.

The choice depends on reuse, deployment, permissions, and who maintains the interface.

Decision table

NeedStarting pointMain caution
Small typed tool set inside one applicationFunction callingA valid schema does not authorize the action or make arguments safe.
Reusable tools across compatible clientsMCP toolsServer identity, credentials, tool changes, and returned content need separate controls.
Existing developer or operations commandCLIValidate arguments, avoid shell interpolation, and restrict environment access and credentials.
Reusable workflow instructions and assetsAgent SkillsInstructions guide tool use; the application still owns tool execution and permissions.
Stable in-process logicTyped function or library APIDo not add a protocol when one codebase owns both sides.

Function calling

Function calling gives the model named operations with structured arguments. It fits a product where tools, policy checks, credentials, and execution live in one application. Keep schemas narrow, validate every argument, and evaluate both tool selection and the resulting side effect.

MCP

MCP separates clients from reusable servers and standardizes discovery and invocation. It is useful when the same integration should work across several compatible agents or applications. Its authorization mechanisms still need application-specific permission checks. Authenticate the server, scope tokens, review tool-definition changes, isolate untrusted servers, and treat results as untrusted input.

CLI tools

A CLI is often the shortest path to mature capabilities such as Git, package managers, cloud tooling, and build systems. Prefer structured output, explicit working directories, non-interactive flags, bounded timeouts, and narrowly scoped credentials. Avoid constructing shell strings from untrusted text.

Skills

A skill packages procedural instructions and may include scripts, references, or templates. The Agent Skills specification lets compatible agents load those instructions when needed. Use it to describe a workflow that existing tools can execute. Keep it small enough to review, record version assumptions, and state which actions need approval.

Selection checklist

  • Who owns the client, interface, and implementation?
  • Must several clients reuse it?
  • Is the input schema narrow and versioned?
  • Where are authorization and approval enforced?
  • Can untrusted content reach credentials or network egress?
  • Are calls, arguments, results, and policy decisions traceable?
  • Can a typed library call solve the problem with less surface area?

Deeper reading

References