|
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
| Volume 187 - Issue 127 |
| Published: July 2026 |
| Authors: Veera Ravindra Divi, Sneha Gullapalli |
10.5120/ijca9affef83fcf7
|
Veera Ravindra Divi, Sneha Gullapalli . Graph-based Detection of Prompt Injection and Tool Misuse in MCP-Enabled AI Agents: The AgentShield-G Guardrail Model. International Journal of Computer Applications. 187, 127 (July 2026), 38-44. DOI=10.5120/ijca9affef83fcf7
@article{ 10.5120/ijca9affef83fcf7,
author = { Veera Ravindra Divi,Sneha Gullapalli },
title = { Graph-based Detection of Prompt Injection and Tool Misuse in MCP-Enabled AI Agents: The AgentShield-G Guardrail Model },
journal = { International Journal of Computer Applications },
year = { 2026 },
volume = { 187 },
number = { 127 },
pages = { 38-44 },
doi = { 10.5120/ijca9affef83fcf7 },
publisher = { Foundation of Computer Science (FCS), NY, USA }
}
%0 Journal Article
%D 2026
%A Veera Ravindra Divi
%A Sneha Gullapalli
%T Graph-based Detection of Prompt Injection and Tool Misuse in MCP-Enabled AI Agents: The AgentShield-G Guardrail Model%T
%J International Journal of Computer Applications
%V 187
%N 127
%P 38-44
%R 10.5120/ijca9affef83fcf7
%I Foundation of Computer Science (FCS), NY, USA
Tool-using language agents now reach into file repositories, internal APIs, databases, source trees, and external messaging systems, often through the Model Context Protocol (MCP). The same connectivity that makes these agents useful also widens their attack surface: a single line of attacker-controlled text inside a retrieved document can redirect an agent toward exfiltrating a secret or executing a destructive action. This paper proposes AgentShield-G, a graph-based guardrail model that detects prompt injection and tool misuse by treating an agent session as a dynamic, typed interaction graph over users, prompts, retrieved context, plans, tool calls, and permission scopes. Rather than classifying prompt text in isolation, AgentShield-G scores each candidate tool call from structural signals—privilege-escalation path length, proximity to sensitive tools, the transition likelihood from prompt to tool, an anomalous context-injection score, and a count of repeated unsafe attempts—and gates calls whose composite risk exceeds a threshold. The graph is defined formally, an online scoring and gating algorithm is given, and a simulation harness of benign and adversarial workflows spanning file access, API calls, database queries, code modification, and external communication is described. Illustrative results from that harness are reported, including detection rate, false-positive rate, blocked-unsafe-action rate, an explainability measure, and per-update overhead, together with an ablation that isolates the contribution of the escalation-path and context-injection features. All reported numbers are simulated and are intended to characterize the design, not to certify a deployed system. The work is framed as defensive research: it models attack categories at the taxonomy level and proposes a protective layer that complements, rather than replaces, permission and sandbox controls.