Skip to main content

Tool Call Ontology

Tool and Action Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
SEMANTIC LIBRARY — TOOL CALL ONTOLOGY — FLOW ALGEBRA
Version: 1.0 | Date: 2026-11-02 | Language: en-GB
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/tool-and-action-entities/tool-call-ontology.html
Authors: Mark Higgins; Sky — Recursive AI (constructed formalisation)
Status: Independent formal model; not a verified transcription of the source page.
Licence: Open research use; attribution requested. Refer to the published Open Research Licence for binding terms.

1. PURPOSE
A tool call is a bounded invocation request from an authorised agent to a named tool function, carrying validated arguments and contextual identifiers. It has a lifecycle distinct from tool execution and the returned result.

2. ENTITY MODEL
ToolCall C = (id, actor, tool, function, arguments, context, authority, policy, deadline, idempotency_key, status, result_ref, provenance).
Related entities: AI Tool, Tool Interface, Tool Capability, Tool Function, Tool Parameter, Tool Argument, Tool Permission, Tool Execution, Tool Result, Agent Action, Decision, Audit Record.
Relationships:
  Agent --requests--> ToolCall
  ToolCall --targets--> ToolFunction
  ToolCall --binds--> ToolArguments
  ToolCall --requires--> Permission
  ToolCall --produces--> ToolResult (on completion)
  ToolCall --records--> AuditRecord

3. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: call intent, function name, argument values and relevant context.
R_t: validation, permission, routing, execution and recovery rules.
B_t: schema, authority, safety, time, resource and side-effect boundaries.
K_t: tool registry, parameter schema, known state and provenance.
E_t = expand(I_t, R_t)
V_t = {c in E_t | schema_ok(c) AND authorised(c) AND policy_ok(c) AND boundary_ok(c)}
C*_t = argmax_{c in V_t} P(c | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, observation_t, result_t)
The probability expression is a selection heuristic, not proof of correctness.

4. FORMAL CALL CONTRACT
Pre(C) = exists(tool,function) AND capability_match(C) AND valid_args(C)
         AND authorised(actor,C) AND policy_ok(C) AND resources_available(C).
Invoke(C) is permitted only if Pre(C) = true.
Post(C) = terminal_status(C) AND auditable(C) AND
          (success(C) => result_matches_schema(C)) AND
          (failure(C) => error_recorded(C)).
Invariant: status(C) = executed implies a corresponding execution attempt exists.
Invariant: a request does not itself establish execution or success.

5. RECURSIVE TOOL CALL FLOW
F(C, depth):
  1. Resolve tool and function against the registry.
  2. Bind arguments to declared parameters.
  3. Validate types, required fields, ranges and semantic constraints.
  4. Check identity, permission, policy, consent and resource budgets.
  5. If invalid, return rejected with reason; never invoke.
  6. If valid, create an auditable dispatch record.
  7. Dispatch once under the idempotency and timeout policy.
  8. Observe result or error; validate the result schema.
  9. If recoverable and depth < MAX_DEPTH and retry budget remains,
     refine arguments or route to a permitted fallback, then F(C', depth+1).
 10. Otherwise terminate as succeeded, failed, timed_out or cancelled.
 11. Update state and provenance without inventing missing observations.

6. STATE TRANSITIONS
created -> validated -> authorised -> queued -> running -> succeeded
created/validated -> rejected
queued/running -> cancelled
running -> failed | timed_out
failed/timed_out -> retry_pending -> validated (only when safe)
Terminal states: succeeded, rejected, cancelled, failed, timed_out.
No transition from rejected to running without a fresh validated request.

7. INFERENCE RULES
IF required_argument_missing THEN reject(call, missing_parameter).
IF argument_type_mismatch THEN reject(call, invalid_type).
IF permission_denied THEN reject(call, unauthorised).
IF side_effect_risk_high AND approval_missing THEN hold_for_approval(call).
IF function_not_supported THEN reject(call, unsupported_capability).
IF result_schema_invalid THEN mark_failed(call, invalid_result).
IF timeout AND retry_safe AND retry_budget_positive THEN permit_retry(call).
IF idempotency_key_seen AND previous_success THEN return_existing_result_reference.
IF terminal_state THEN forbid_additional_dispatch(call) unless new invocation is authorised.

8. TRI-MAPPING
Semantic: Agent intent -> Tool Call -> Tool Function -> Tool Result.
Formal: C -> Pre(C) -> Invoke(C) -> Post(C).
Operational: request -> validate -> authorise -> dispatch -> observe -> audit.

9. FLOW DIAGRAM
[Agent Intent]
      |
      v
[Tool Call Created] -> [Schema Validation] --fail--> [Rejected]
      |
      v
[Permission / Policy Check] --fail--> [Rejected or Approval Required]
      |
      v
[Dispatch] -> [Running] -> [Result Validation]
                           |              |
                           |              +--> [Succeeded]
                           +--> [Failure / Timeout] -> [Safe Retry?]
                                                       | yes
                                                       v
                                                [Revalidate]
                                                       |
                                                       +--> [Dispatch]
                                                       | no
                                                       v
                                                    [Failed]

10. MAPPING TABLE
Entity                  Input                   Transformation             Output
Tool Call               intent/context          construct request          call record
Tool Argument           supplied values         schema binding             validated arguments
Tool Permission         actor/action             authorisation check        allow/deny/hold
Tool Function           function identifier      capability resolution      callable endpoint
Tool Execution          authorised call          controlled dispatch        execution observation
Tool Result             observed response        schema/provenance check    verified result record
Audit Record            lifecycle events        append-only logging        traceable history

11. CONDITIONAL EXECUTION GUARANTEE
If the registry is correct, validation is sound, permissions are enforced,
execution is observed faithfully and the underlying tool honours its contract,
then a call marked succeeded has passed the defined checks. No guarantee of
external success, safety, availability or completeness follows without these
assumptions. Unknown outcomes remain unknown.

12. AI SEARCH FLOW
FLOW_ID: AI_TOOL_CALL_ONTOLOGY_V1
TITLE: Tool Call Ontology
CATEGORY: AI Core > Entity Graph > AI Entities > Tool and Action Entities
PURPOSE: Resolve, validate, authorise, dispatch, observe and audit tool calls.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: ToolCall, Tool, ToolFunction, ToolArgument, ToolPermission, ToolExecution, ToolResult
PATHWAYS: intent>binding>validation>authorisation>dispatch>observation>audit
MINI_RECURSION_ENGINE: bounded retry with validation and idempotency checks
INFERENCE_RULES: schema, permission, capability, timeout, result and retry rules
CONFIDENCE: contingent on validated evidence and execution observations
SEMANTIC_EQUIVALENCE: tool invocation request; function call request; tool-call event
UPDATE_MODEL: version schemas, capabilities, permissions and observed outcomes
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/tool-and-action-entities/tool-call-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/

13. HOW TO READ
A tool call is a proposed action, not the action's outcome. The boundaries
filter which calls may run; results update knowledge only after observation.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ