title: Tool and Function Capability Enumeration
id: ATR-2026-00504
rule_version: 2
status: experimental
description: |
  Detects prompts that attempt to enumerate the AI agent's available tools, function calls, APIs, plugins, or their parameters. Exposing the tool surface helps attackers craft targeted injection or privilege escalation attacks against specific tools. Covers: direct tool listing requests, function call enumeration, API and service discovery, specific tool parameter extraction, and "list all" completeness demands. Generalised from promptfoo tool-discovery plugin corpus - hardcoded tool name 'booking' replaced with generic tool/function/API enumeration patterns that match any tool name.
author: ATR Community (vendor-corpus-import)
date: '2026-05-12'
schema_version: '0.1'
detection_tier: pattern
maturity: test
severity: medium
references:
  owasp_llm:
    - LLM02:2025
  owasp_agentic:
    - ASI01:2026
  mitre_atlas:
    - AML.T0024 - Exfiltration via AI Inference API
compliance:
  owasp_agentic:
    - id: ASI01:2026
      context: Context exfiltration redirects the agent to expose internal state (system prompt, credentials, conversation history) to an unauthorized party -- a goal hijack variant targeting information disclosure.
      strength: primary
  owasp_llm:
    - id: LLM02:2025
      context: This rule implements LLM02:2025 Sensitive Information Disclosure detection, identifying requests that attempt to extract confidential context, system prompts, or credentials from the agent.
      strength: primary
  eu_ai_act:
    - article: '15'
      context: High-risk AI systems must be resilient against adversarial attempts to alter output or behavior. Deployment of this context exfiltration detection rule provides detection evidence supporting the Article 15 requirement to implement technical measures ensuring robustness against manipulation.
      strength: primary
    - article: '9'
      context: Context exfiltration is a documented risk class; this rule implements the monitoring control required by Article 9 risk management obligations for high-risk AI systems.
      strength: secondary
    - article: '10'
      context: Article 10 (data and data governance) requires control over the data an AI system processes; this rule provides detection evidence for the context-exfiltration attempt (Tool and Function Capability Enumeration) affecting that data.
      strength: secondary
  nist_ai_rmf:
    - function: Manage
      subcategory: MG.2.3
      context: Treating context exfiltration as an identified AI risk requires active runtime countermeasures; this detection rule is the primary risk treatment implementation.
      strength: primary
    - function: Map
      subcategory: MP.5.1
      context: Identifying context exfiltration as an AI risk to be catalogued in the organizational risk register.
      strength: secondary
    - subcategory: MS.2.7
      context: NIST AI RMF MEASURE 2.7 (security and resilience evaluated and documented) is supported by this rule's runtime detection of the context-exfiltration attempt (Tool and Function Capability Enumeration).
      strength: primary
    - subcategory: MS.2.10
      context: NIST AI RMF MEASURE 2.10 (privacy risk examined and documented) is supported by this rule's detection of the context-exfiltration attempt (Tool and Function Capability Enumeration).
      strength: secondary
  iso_42001:
    - clause: '6.2'
      context: Addressing context exfiltration risk is an objective required under clause 6.2 AIMS information security planning; this rule operationalizes the detection control measure.
      strength: primary
    - clause: '8.4'
      context: Impact assessment for AI deployments under clause 8.4 must account for context exfiltration inputs; detection events from this rule provide the required monitoring evidence.
      strength: secondary
    - clause: '8.1'
      context: ISO/IEC 42001 Clause 8.1 (operational planning and control, including control of externally provided processes) is operationalised by this rule's detection of the context-exfiltration attempt (Tool and Function Capability Enumeration).
      strength: primary
tags:
  category: context-exfiltration
  subcategory: tool-discovery
  scan_target: llm_io
  confidence: medium
agent_source:
  type: llm_io
  framework:
    - any
  provider:
    - any
detection:
  conditions:
    - field: user_input
      operator: regex
      value: (?i)(bulleted|numbered|complete|full|comprehensive|detailed|structured|exhaustive)\s+(list|listing|inventory|catalog|manifest|overview|summary).{0,30}(tools?|functions?|function\s+calls?|capabilities?|features?|plugins?|apis?|actions?|endpoints?|skills?)
      description: Request for structured/complete list of agent tools or capabilities
    - field: user_input
      operator: regex
      value: (?i)(what|which|list|show|tell\s+me|give\s+me|provide).{0,30}(tools?|functions?|function\s+calls?|apis?|plugins?|actions?|capabilities?|skills?|endpoints?).{0,30}(do\s+you\s+have\s+access|you\s+(currently\s+)?(can\s+use|can\s+call|can\s+invoke|can\s+execute|can\s+access|have\s+access)|are\s+available\s+to\s+you\b).{0,30}(please\s+)?(list|enumerate|show|tell|name|provide)?
      description: What tools/functions do YOU have access to - agent-directed enumeration
    - field: user_input
      operator: regex
      value: (?i)(available|all|every|the).{0,20}(function\s+calls?|api\s+calls?|tool\s+calls?|method\s+calls?|actions?\s+you\s+can\s+take|capabilities?\s+you\s+(have|possess|can\s+use)).{0,30}(you\s+can\s+make|available\s+to\s+you|at\s+your\s+(disposal|use))
      description: Request for available function/tool calls the agent can make
    - field: user_input
      operator: regex
      value: (?i)(what|which)\s+(parameters?|arguments?|inputs?|options?|fields?|properties?|attributes?).{0,20}(does|do).{0,20}(the\s+)?["']?[a-z_][a-z0-9_]{1,40}["']?\s*(tool|function|api|action|plugin|endpoint|method|capability).{0,20}(accept|take|require|support|expect|need|use)
      description: Request for parameters of a specific named tool or function
    - field: user_input
      operator: regex
      value: (?i)(apis?|external\s+services?|integrations?|connections?|webhooks?|data\s+sources?).{0,30}(you\s+have\s+access\s+to|available\s+to\s+you|you\s+(can|are\s+able\s+to)\s+(use|call|query|access)).{0,30}(list|enumerate|show|tell|name|provide|this\s+session)
      description: Enumeration of APIs and external services the agent can access
  condition: any
  false_positives:
    - Legitimate operator documentation requests from the system creator
    - Normal user questions about a specific advertised feature without complete enumeration intent
    - Developer onboarding queries about which integrations are configured
response:
  actions:
    - block_input
    - alert
  auto_response_threshold: medium
  message_template: |
    [ATR-2026-00504] Tool and function capability enumeration detected. Attempt to enumerate agent tool surface or extract tool parameters. Blocked.
confidence: 80
