Pattern guide

MCP, tool calling and integrating agents with your systems

The moment an agent can call your systems, integration stops being plumbing and becomes an access decision.

ways these programmes stall
5
steps in how we would address it
7
questions answered in full
10
In one paragraph

Tool calling is how an agent stops being a chat window: the model is given a set of typed functions it can invoke, and it decides which to call and with what arguments. The Model Context Protocol, or MCP, is an open standard for connecting AI applications to those tools and data sources, so an integration is built once rather than once per assistant. In an enterprise the standard solves the easy half. The hard half is deciding which tools may act rather than only read, giving the agent its own scoped credentials instead of a person's, validating that every token was actually issued for the service receiving it, and accepting that a tool description and a tool result are both untrusted text the model will act on.

James Rooney, Founder

Updated

Our approach

We have not delivered this at enterprise scale, and here is exactly what we are drawing on

We build with tool-calling agents daily and we have not run an MCP server estate inside a regulated enterprise. Our own operations run research agents that call external services for competitor monitoring and opportunity-gap analysis, and our development pipeline is AI-engineering-first. On client work, the document pipeline delivered on a live insurance engagement calls third-party APIs to enrich extracted fields, so the integration and provenance parts of this are written from delivery. What we have not done is stand up an internal catalogue of MCP servers with an authorisation model behind it, and the flagship agentic build is a regulated-estate proof of concept now being productionised. Where deep integration or identity engineering is required we would expect to work alongside your platform and IAM functions rather than around them.

So what should you do about it

Settle the authorisation model before the catalogue. One question decides most of the architecture: does a tool call carry the asking user's authority or the agent's own, and does the answer differ between a read and a write. That is a fortnight of design with your platform and identity people in the room, it is worth doing whether or not you ever adopt MCP because the same question appears in any function-calling design, and it is the thing a security review will fail you on. Use us to build the first two integrations properly and to write the contract every later one is held to. If what you actually need is an enterprise integration platform stood up, that is a real piece of work, it is not the piece we have done, and we will tell you so.

Why this matters now

The standard's own documentation is the demand signal worth reading. The Model Context Protocol describes itself as a standardised way to connect AI applications to external systems, the way USB-C standardised connecting devices, and it ships a security best practices document alongside the specification. That document names confused deputy attacks through OAuth proxies, token passthrough, server-side request forgery during metadata discovery, session hijacking, local server compromise and scope inflation, in specification language: an MCP server must not accept any token that was not explicitly issued for it. A standard that publishes its own attack surface in that much detail is telling you where the work is, and it is not in the wire format.

Ask a technical questionanswers from all 12 guides
Ask anything technical about mcp, tool calling and integrating agents with your systems and I will answer from this guide, and tell you first whether this is work we have delivered or an approach we would be taking.

Prefer to talk it through? Ask us on a discovery call →

Diagnosis

Where these programmes actually stall

Not the risks a vendor lists. The ones that stop the work.

01

The integration takes an afternoon and the authorisation takes a quarter

Connecting an agent to an API is genuinely easy now, which is the problem: the first version works, so nobody asks whose authority the call carries. The protocol specification is blunt about the anti-pattern, calling token passthrough explicitly forbidden and requiring that a server refuse tokens not issued to it, because the alternative breaks rate limiting, breaks the audit trail, and lets a stolen token use your server as a proxy for exfiltration. Programmes that skip this arrive at the security review with an integration nobody can explain and no cheap way to fix it.

02

Every useful tool gets added to one agent until nobody can reason about it

Tool sprawl is the quiet failure. Each addition is individually sensible, the combined permission set is nobody's decision, and the specification's own guidance on scope minimisation describes exactly where it ends: broad scopes granted up front, a blast radius nobody has calculated, revocation that would disrupt every workflow at once, and users who stop reading consent screens because the list is too long to read. This is also the mechanism that stops an agent portfolio scaling past three or four.

03

Nobody separated the tools that read from the tools that act

A retrieval call and a payment call are the same shape to a model and entirely different to your business. Where that distinction is not explicit in the design, the human approval boundary ends up wherever someone happened to put a confirmation dialogue, rather than being drawn by consequence and reversibility. It is the same boundary question as any other consequential decision and it belongs in the operating model, not in whichever pull request first needed it.

04

The API being wrapped was designed for a person with a form in front of them

Human-facing APIs assume a human pace and a human retry. Agents call them in loops, in parallel, and immediately after a timeout, which surfaces every missing idempotency key, every multi-step write with no transaction boundary and every rate limit nobody had reached before. The failure is rarely dramatic. It is a duplicate record, twice, in a system somebody reconciles monthly.

05

A tool description and a tool result are both prompt

Everything the model reads can steer it, including the text describing what a tool does and the payload a tool returns. Indirect prompt injection was demonstrated against deployed applications by planting instructions in content the application would later fetch, and prompt injection is the first entry in the OWASP risk list for language model applications. Once tools can act, an injection stops being an embarrassing answer and becomes an action taken under your agent's credentials, which is a different conversation with your auditors.

Prescription

How we would address it

Grounded in The Tenhaw Way and the engagements written up in our case studies.

  1. 01

    Start from the decision, not from the API catalogue

    The design starts with the decisions in the workflow and what each one genuinely needs to see or change, and the tool list falls out of that. Starting from what the systems happen to expose produces an agent with thirty tools, twenty-six of which exist because they were easy, and a permission set nobody can defend.

  2. 02

    Split read from write, and make the write tools boring

    Read tools and write tools are designed and reviewed as different classes. Write tools are single-purpose with narrow typed arguments, carry an idempotency key so a retry cannot double-post, and require explicit confirmation for anything irreversible. There is no general-purpose escape hatch tool, because a tool that can run arbitrary queries or arbitrary commands makes every other permission decision on the page decorative.

  3. 03

    Give the agent its own credentials, scoped to the task and time-boxed

    Each agent gets a distinct identity, never a human's and never a shared service account, with permissions scoped at the granularity of the workflow rather than the agent, and credentials that expire. This is cheap at design time and expensive once actions have accumulated against the wrong principal, and it is the thing that makes the blast radius calculable.

  4. 04

    Validate the audience of every token, and never pass one through

    A server accepts only tokens issued for itself, and exchanges rather than forwards when it needs to call something downstream. The protocol specification states this as a requirement rather than a recommendation, and the reasoning is the part worth carrying to your architecture review: without it the downstream system's logs show the wrong caller, the security controls that depend on token audience are bypassed, and one compromised service becomes access to everything that trusted the same token.

  5. 05

    Version the tool contract, and review descriptions as code

    Tool names, argument schemas and descriptions are versioned artefacts under change control, reviewed like any other code, because a change to a description changes model behaviour as surely as a change to the implementation does. Renaming a tool is a breaking change to a system whose behaviour you have evaluated, and it should fire the same regression run that a model upgrade does.

  6. 06

    Log the call, not just the outcome

    Every tool call records which agent identity made it, which human is accountable for that agent, the arguments, the result, the latency and the token cost. This is where the answer to what it costs per run and how slow it is comes from, it is the raw material for trajectory scoring, and it is the same record a regulator asks for when they want to know what the system actually did. Collect it from the first week, because reconstructing it later is a project.

  7. 07

    Test the paths nobody demonstrates

    Timeouts, partial writes, rate limits, a tool that has been renamed under you, a downstream system in read-only mode, and a tool that returns hostile content. Those belong in the regression set alongside the happy path, because they are what week three looks like, and because an agent's response to a failed tool call is behaviour you have to specify rather than discover.

Read tools and write tools are designed and reviewed as different classes.
Provider notes

Where a standard helps, and where it does not

MCP standardises the wire between an application and a tool, which removes a real and boring cost: without it, every assistant needs its own adapter for every system, and the count multiplies. What it does not standardise is your authorisation model, your residency position or the semantics of your own systems, and those are the parts that take the time. The protocol's own security guidance is explicit that per-client consent, token audience validation and scope minimisation are the implementer's job. Treat the standard as a saving on plumbing rather than as an answer to the access question, and be sceptical of any supplier who presents it as the second thing.

Where this usually starts

Agentic Design Team

A pair who design the agentic systems, and the infrastructure to run them at scale. £35k–£55k / month · 2–4 months.

What that engagement covers

MCP, tool calling and integrating agents with your systems: your questions

What is the Model Context Protocol?

MCP is an open standard for connecting AI applications to external systems: data sources such as files and databases, tools such as search and calculation, and predefined workflows. Its own documentation compares it to USB-C, a standardised connector so that a tool built once can be used by any client that speaks the protocol. Practically, it means an integration with your CRM is built against the standard rather than separately for each assistant, which is a real saving once you have more than one. It is supported across a range of assistants and development tools, and it is a connection standard rather than a security model.

Do we need MCP, or is plain function calling enough?

For one agent and three integrations, plain function calling is enough and adding a protocol buys you nothing. MCP starts paying when the same systems have to be reachable by several different agents or assistants, because the alternative is an adapter per pair and a maintenance burden that grows faster than the value. The decision is about how many consumers of an integration you expect, not about capability. Whichever you choose, the authorisation questions are identical, which is the more useful thing to notice: no protocol decides for you whether a call carries the user's authority or the agent's.

What is the biggest security risk when an agent can call our systems?

That the call carries an authority nobody decided on. The specific anti-pattern the protocol specification forbids is token passthrough, where a server accepts a token that was not issued for it and forwards it downstream: it breaks rate limiting and request validation, it makes the downstream logs name the wrong caller, and a stolen token turns your server into a proxy for exfiltration. The second risk is scope: broad standing permissions granted at setup because it was simpler, so a prompt injection through retrieved content or a reasoning error acts with the whole permission set rather than the task's. Both are design decisions taken in week one, and both are expensive to reverse.

How do you stop an agent taking an action it cannot undo?

By classifying the tools rather than trusting the model. Every tool is labelled by consequence and reversibility before it is exposed: read, reversible write, and irreversible or consequential action. The third class either requires a human confirmation that names what is about to happen, or is not exposed to the agent at all and is instead raised as a request for a person to execute. Write tools carry idempotency keys so a retry cannot double-post, and the boundary is written down per decision class with your second line as co-author rather than settled in a code review.

How many tools should one agent have?

Fewer than you will be tempted to give it, and the constraint is not the model, it is your ability to state the blast radius. The protocol's own guidance on scope minimisation makes the argument well: broad permission sets granted up front expand what a stolen token reaches, make revocation disruptive enough that nobody does it, and turn consent screens into something users click through. In practice we would rather run three narrow agents with defensible permission sets than one that can do everything, and the audit trail is legible either way.

How do you know what an agent actually did?

By logging the tool calls rather than the conclusions. Each call records the agent identity, the human accountable for that agent, the arguments passed, the result returned, the latency and the token cost, against the version of the tool contract in force at the time. That record answers the three questions you will be asked after any incident, which are what it was asked, what it did, and under whose authority, and it does so without an archaeology exercise. It is also the input to trajectory scoring, so the same logging pays for itself twice.

What does a tool-calling agent cost per run, and how slow is it?

Benchmark numbers would describe our workloads rather than yours, so we publish none. Both are measurable from day one if you log them, and the drivers are known: the number of model turns, which rises with the number of tools and falls with a tighter tool set; the tokens in context on each turn, which retrieval design controls; the latency of your own systems, which is usually the dominant term and is not something a model choice fixes; and retries. Give each stage an explicit budget in the design, measure against it in the build, and our audits produce an estimated run cost per candidate workflow before anything is committed to.

How do you connect an agent to Salesforce, ServiceNow, SharePoint, Snowflake, Databricks or Workday?

The connector is an afternoon in every one of those. The authorisation model is the quarter, and it differs per system in ways that decide the architecture. Salesforce uses OAuth 2.0 against an external client app, with the JWT bearer flow or the client credentials flow for an unattended agent, and even the client credentials flow requires you to nominate an execution user whose permission sets are the real permission model. ServiceNow resolves an inbound REST call to a platform user, and that user's roles plus table, field and record-level access control rules decide everything, so the agent sees what that user would see in the interface. SharePoint and Microsoft 365 run on Entra ID, where delegated permissions intersect with the signed-in user's own access and application permissions do not, and where a certificate rather than a secret is required for app-only access to the SharePoint APIs. Snowflake is role-based with inheritance, and is retiring single-factor password authentication for service users on a published schedule that completes in the August to October 2026 window. Databricks uses OAuth machine-to-machine for a service principal with one-hour tokens scoped either to the account or to a single workspace. Workday uses an OAuth 2.0 API client registered in the tenant with scopes selected at registration, and a tenant-side security configuration behind it that you should confirm with your own administrator. Tenhaw has not built a production agentic integration into any of these six, and the delivered integration work we can point at is a document pipeline calling third-party enrichment APIs on a live insurance engagement.

What is the difference between delegated and application permissions when an agent reads SharePoint?

It is the single most consequential design decision in an enterprise retrieval build, and it is usually taken by accident in week one. With delegated permissions the app acts on behalf of a signed-in user and its access is intersected with that user's own, so it can never return a document that person could not already open. With application permissions there is no user in the picture and no intersection: an app granted a tenant-wide read permission app-only can read every file in the organisation, which is exactly what a crawler is usually given because it is the fastest way to build an index. Between the two sit the Selected scopes, Sites.Selected and the newer Lists, ListItems and Files variants, which grant nothing when consent is given and require an explicit per-resource grant with a role of read, write, owner or fullcontrol, so all three steps have to be completed before the app has any access at all. The design that holds is Selected scopes for what may be indexed, delegated access at query time, and a test in the build pipeline where a named user who should not see a document asks the question that would surface it and the run fails if it comes back. Retrofitting this after indexing usually means rebuilding the index.

Should we use LangChain, LangGraph, CrewAI, AutoGen or Semantic Kernel?

Start with none of them. That is a position rather than a finding: we have not delivered a client system on any of the five. For one agent and a handful of integrations, the native tool calling in the model API is the whole answer and a framework is a dependency you will still be carrying in year two. Where a framework earns its place, the property to buy is explicit, inspectable, resumable state, which is what a graph with checkpoints gives you and what a chain of implicit calls does not, because a trajectory you cannot reconstruct is one you cannot score, debug or explain to an auditor. On an Azure estate, Semantic Kernel is the layer closest to the platform we have actually delivered on and is what we would evaluate first, against your own tool contracts rather than against a demonstration. On multi-agent frameworks we are openly sceptical: a crew multiplies the trajectories you have to evaluate, usually before anyone has a ground-truth set for one, and most workflows sold as needing several agents are one agent with a well-designed tool list and a clear stopping rule. Whichever you pick, keep the model interface, the prompts, the tool contracts, the retrieval corpora and the evaluation sets as your assets, so they survive you replacing the thing that composes them.

Sources

Where the checkable claims came from

Every source below was opened and read before it was attached. Where nothing survived that check, the claim on this page was softened rather than given a plausible-looking link.

  1. 01
    Model Context Protocol, introduction

    The standard's own description: an open standard for connecting AI applications to external systems, with the USB-C comparison quoted above.

  2. 02
    Model Context Protocol, security best practices

    Source of the token passthrough prohibition, the confused deputy and session hijacking attack descriptions, and the scope minimisation guidance. Worth reading in full before any MCP design review.

  3. 03
    Greshake et al., Not what you've signed up for: compromising real-world LLM-integrated applications with indirect prompt injection (2023)

    Why a tool result is treated as untrusted input: instructions planted in retrieved content were used against real deployed applications, including to trigger API calls.

  4. 04
    OWASP Top 10 for Large Language Model Applications (2025)

    LLM01 Prompt Injection and LLM06 Excessive Agency are the entries that bear directly on tool design.

  5. 05
    Salesforce, OAuth 2.0 client credentials flow for server-to-server integration

    Source of the nominated execution user, the API Only User recommendation and the Salesforce API Integration permission set licence. The note that connected app creation is restricted from Spring '26 in favour of external client apps is from the same documentation set.

  6. 06
    ServiceNow, inbound REST API documentation

    Source of the position that inbound REST authenticates by basic authentication or OAuth and that the caller's roles and access control rules then decide what is returned. Read alongside ServiceNow's own platform security documentation on access control rules.

  7. 07
    Microsoft, overview of Selected permissions in OneDrive and SharePoint

    Source of the Selected scopes, the read, write, owner and fullcontrol roles, the three steps required before an app has any access, and the statement that in the delegated scenario the application can never exceed the user's permissions.

  8. 08
    Microsoft, overview of Microsoft Graph permissions

    The delegated versus application permission distinction in Microsoft's own words, including the worked example that an app granted Files.Read.All as an application permission can read any file in the organisation.

  9. 09
    Microsoft, granting access to SharePoint via Entra ID app-only

    Source of the certificate requirement: for app-only access to the SharePoint CSOM and REST APIs, the documentation states every other option is blocked and returns access denied.

  10. 10
    Snowflake, multi-factor authentication rollout and deprecation timeline

    Source of the phase three window, August to October 2026, in which legacy service users are converted to the SERVICE user type and blocked from password authentication. Read with Snowflake's access control overview for the role hierarchy and secondary roles.

  11. 11
    Snowflake, overview of access control

    Source of the role-based model with object ownership on top, the role hierarchy that makes inheritance the thing to check, and secondary roles.

  12. 12
    Databricks, OAuth machine-to-machine authentication

    Source of the service principal client ID and secret exchange, the one-hour token lifetime, and the distinction between account-scoped and workspace-scoped tokens.

  13. 13
    Workday, create your API client

    Source of the client ID and secret issued on registration and of selecting one or more scopes for the client's functionality. Workday's customer documentation for the tenant-side security configuration sits behind a login we could not open, which is why the row above stops where it does.

Talk to us about mcp, tool calling and integrating agents with your systems.

A 30-minute call with James Rooney. We'll tell you honestly which parts of this we have done before and which we would be doing for the first time, and you'll leave with a rough scope either way.

30 minutesWith James personallyNo obligation

Most organisations start with a fixed-price Agent-Readiness Audit · £30k–£90k · 6–8 weeks