Skip to content

Evidence Receipt: Tool Binding

Capability: CAP-TOOL-001 Agent Tool Binding

Authority

  • Specification: OSSA (JSON Schema Tool Definitions)
  • Runtime: Drupal (PHP)
  • Extension: Drupal Contrib Tool API (drupal/tool / ContextDefinitions)

Acceptance Criteria

  • Lossless, bidirectional mapping between OSSA Tool definitions and Drupal Plugin definitions.
  • Full execution parameter support.
  • Preserves nested parameter structures and validation rules.

Candidate Matrix

Candidate Native Typed Data Support Complex Validation Extensible
Core Actions API ✓ Limited Poor Medium
Contrib Tool API (ContextDefinitions) ✓ (Contrib) Excellent Partial Excellent
Custom OSSA Tool Mapper ❌ N/A Excellent (JSON Schema) Poor

Evidence (Reasoned)

Capability Evaluation Matrix

Drupal Capability OSSA Requirement Result
ContextDefinition primitives (String, Int, Bool) JSON Schema basic types Compatible
ContextDefinition multiple (List/Map) JSON Schema arrays and objects Compatible
Symfony Validation Constraints (in TypedData) JSON Schema advanced (e.g., pattern, enum, minLength) Partial (Requires dynamic translation adapter)
Tool Plugin Discovery Dynamic Tool injection into LLM prompts Compatible

Decision

The Drupal Contrib Tool API utilizing ContextDefinition and TypedData is highly capable of representing OSSA tools for execution. However, a direct 1:1 mapping is not strictly lossless out-of-the-box: OSSA relies on raw JSON Schema for parameter validation (e.g., Regex patterns, complex enums), while Drupal relies on Symfony Constraint plugins attached to TypedData.

The lowest-authority implementation is to adopt the Contrib Tool API as the runtime structure, and build a dedicated Extension (Adapter) that maps JSON Schema constraints into Symfony Validation constraints during runtime discovery. The proprietary custom OSSA tool mapping logic must be retired.

Remaining Delta

  • Classification: EXTENSION

Implementation Surface

  • + src/Plugin/OssaToolAdapter.php (Translates JSON Schema to TypedData Constraints)
  • + ai_agents_ossa.services.yml

Retired Components

  • - src/Service/OssaToolMapper.php (Assuming existing proprietary mapper exists)
  • - Custom tool definition arrays

Native Coverage

  • Native Coverage: 85% (Leverages Contrib Tool API and Core TypedData)
  • Extension Required: Translation Adapter (JSON Schema -> Symfony Constraints)
  • Replacement Required: None

Signed by: Bluefly Governance Engine