AshAi.Tool.Schema (ash_ai v0.6.1)

Copy Markdown View Source

Generates JSON schemas for tool parameters.

Supports both strict and non-strict modes:

  • strict mode transforms schemas for OpenAI-compatible strict tool calling
  • non-strict mode strips additionalProperties for providers like Gemini

Summary

Functions

Generates a JSON schema for the given tool definition.

Functions

for_action(domain, resource, action, action_parameters \\ nil, tool_arguments \\ [], opts \\ [])

Generates a JSON schema for a given action.

for_tool(tool, opts \\ [])

Generates a JSON schema for the given tool definition.