
A tool call is ultimately just a function name paired with a JSON payload. Deep within that JSON payload sits the true identity of the target resource. Your gateway's job is to extract that target, resolve it against a real-world asset, and decide whether to block the execution before the payload hits your upstream infrastructure.
Relying solely on tool call policies and OAuth scopes leaves you with coarse-grained access control for AI agents. Here is a breakdown of why this gap exists and how we solve it at Andromeda Security.
Imagine an AI customer support agent integrated into a B2B SaaS platform. To answer customer tickets efficiently, the agent has access to a backend database tool: query_customer_data.
On paper, the agent is fully authenticated, authorized, and compliant with your coarse-grained policy.
A Tier-1 support representative receives a ticket asking: "Can you confirm if our account migration from tenant ACME_CORP to ACME_RENEWAL went through yesterday?"
The representative prompts the agent: "Check the database and show me the details for ACME_CORP and ACME_RENEWAL."
The LLM formats its request and executes the following tool call:
JSON
{
"name": "query_customer_data",
"arguments": {
"sql_statement": "SELECT * FROM public.tenants WHERE tenant_id IN ('ACME_CORP', 'ACME_RENEWAL') JOIN sensitive_financials ON public.tenants.id = sensitive_financials.tenant_id"
}
}Because traditional security mechanisms only evaluate who is calling (OAuth scope) and what function is invoked (Tool Call Policy), this query sails straight through to the upstream database. The fine-grained target resource (sensitive_financials) remains invisible to coarse policy layers.
Extracting target resources at the gateway level introduces several engineering hurdles:
Tool schemas are dynamic. Because your security layer brokers tool calls, it controls the schema presented to the LLM. You can leverage this by injecting a dedicated, reserved parameter into the schema whose explicit job is to capture a canonical identifier for the target resource.
Because the field is built into the tool definition, the LLM populates it automatically:
JSON
{
"name": "query_warehouse",
"arguments": {
"sql_payload": "SELECT * FROM finance_prod.payroll JOIN hr.users...",
"_target_resource": "urn:data:snowflake:acc123:finance_prod:payroll"
}
}This transforms target extraction from an $N \times M$ parsing problem into an $O(1)$ lookup.
Knowing that a call targets finance_prod.payroll is useless without security context. You cannot evaluate authorization policy against an opaque string.
To make accurate decisions, the gateway requires metadata sourced directly from the downstream provider:
This requires an Access Graph—a synchronized model of inventory and entitlement data continuously ingested from downstream providers like Snowflake, AWS, GitHub, and Salesforce.

Because gateway decisions operate under strict single-digit millisecond latency budgets, this graph must be precomputed. Querying provider APIs synchronously on every tool call introduces unacceptable latency; target metadata must be indexed before the request arrives.
With a real-time Access Graph, your gateway can enforce Least-Privilege Intersection:
$$\text{Effective Access} = \text{Policy-Allowed Sets} \cap \text{Provider Entitlements}$$
Without an Access Graph, a tool gateway can only layer static rules on top of existing credentials—it cannot validate what those credentials actually permit. A gateway that adds permissions without understanding provider context isn't a security control; it’s just a proxy with opinions.
Building this in production requires addressing key operational trade-offs:
Moving the trust boundary from the broad application layer down to individual tool calls is essential for safe agent deployment.
However, defining policies is only half the solution. Real protection requires robust target resolution: accurately identifying what a tool call touches without relying on fragile, per-tool parsers, and validating those targets against a precomputed Access Graph.
How is your team currently approaching fine-grained authorization for agentic tool calls? Are you relying on schema sidecars, custom gateways, or scoping down upstream credentials?
A tool call is ultimately just a function name paired with a JSON payload. Deep within that JSON payload sits the true identity of the target resource. Your gateway's job is to extract that target, resolve it against a real-world asset, and decide whether to block the execution before the payload hits your upstream infrastructure.
Relying solely on tool call policies and OAuth scopes leaves you with coarse-grained access control for AI agents. Here is a breakdown of why this gap exists and how we solve it at Andromeda Security.
Imagine an AI customer support agent integrated into a B2B SaaS platform. To answer customer tickets efficiently, the agent has access to a backend database tool: query_customer_data.
On paper, the agent is fully authenticated, authorized, and compliant with your coarse-grained policy.
A Tier-1 support representative receives a ticket asking: "Can you confirm if our account migration from tenant ACME_CORP to ACME_RENEWAL went through yesterday?"
The representative prompts the agent: "Check the database and show me the details for ACME_CORP and ACME_RENEWAL."
The LLM formats its request and executes the following tool call:
JSON
{
"name": "query_customer_data",
"arguments": {
"sql_statement": "SELECT * FROM public.tenants WHERE tenant_id IN ('ACME_CORP', 'ACME_RENEWAL') JOIN sensitive_financials ON public.tenants.id = sensitive_financials.tenant_id"
}
}Because traditional security mechanisms only evaluate who is calling (OAuth scope) and what function is invoked (Tool Call Policy), this query sails straight through to the upstream database. The fine-grained target resource (sensitive_financials) remains invisible to coarse policy layers.
Extracting target resources at the gateway level introduces several engineering hurdles:
Tool schemas are dynamic. Because your security layer brokers tool calls, it controls the schema presented to the LLM. You can leverage this by injecting a dedicated, reserved parameter into the schema whose explicit job is to capture a canonical identifier for the target resource.
Because the field is built into the tool definition, the LLM populates it automatically:
JSON
{
"name": "query_warehouse",
"arguments": {
"sql_payload": "SELECT * FROM finance_prod.payroll JOIN hr.users...",
"_target_resource": "urn:data:snowflake:acc123:finance_prod:payroll"
}
}This transforms target extraction from an $N \times M$ parsing problem into an $O(1)$ lookup.
Knowing that a call targets finance_prod.payroll is useless without security context. You cannot evaluate authorization policy against an opaque string.
To make accurate decisions, the gateway requires metadata sourced directly from the downstream provider:
This requires an Access Graph—a synchronized model of inventory and entitlement data continuously ingested from downstream providers like Snowflake, AWS, GitHub, and Salesforce.

Because gateway decisions operate under strict single-digit millisecond latency budgets, this graph must be precomputed. Querying provider APIs synchronously on every tool call introduces unacceptable latency; target metadata must be indexed before the request arrives.
With a real-time Access Graph, your gateway can enforce Least-Privilege Intersection:
$$\text{Effective Access} = \text{Policy-Allowed Sets} \cap \text{Provider Entitlements}$$
Without an Access Graph, a tool gateway can only layer static rules on top of existing credentials—it cannot validate what those credentials actually permit. A gateway that adds permissions without understanding provider context isn't a security control; it’s just a proxy with opinions.
Building this in production requires addressing key operational trade-offs:
Moving the trust boundary from the broad application layer down to individual tool calls is essential for safe agent deployment.
However, defining policies is only half the solution. Real protection requires robust target resolution: accurately identifying what a tool call touches without relying on fragile, per-tool parsers, and validating those targets against a precomputed Access Graph.
How is your team currently approaching fine-grained authorization for agentic tool calls? Are you relying on schema sidecars, custom gateways, or scoping down upstream credentials?