ToolCall. Doc
(ToolCall v0.4.0)
Copy Markdown
Extracts tool descriptions from @doc strings.
@doc is free-form markdown. The first paragraph becomes the tool
description; a leading # title is stripped, while a leading level-2+
section heading is omitted and its body is used. Bullets under a
## Parameters heading (also Params, Arguments and Args) become
per-parameter descriptions, with an optional type annotation such as
* city (String.t()) - city name. ## Options conventionally documents the
keys of a keyword argument, so those bullets are returned under :options
rather than :params; they are not matched against parameter names, do not
name a parameter by position and do not warn. The section is not part of the
tool description.
@doc """
Get the forecast.
## Parameters
* `city` - city name
* `days` - forecast days
"""
Summary
Functions
Parses a @doc string.