Skip to content

Function: extractToolFilePath()

Makaio Framework


Makaio Framework / tools-core / extractToolFilePath

extractToolFilePath(toolName, args, cwd): string | null

Defined in: ../../../tools/core/src/file-access.ts:55

Extract the target file path from a filesystem tool call’s arguments.

Returns the resolved absolute path, or null if the tool is not a known filesystem tool or the args don’t contain the expected path field.

string | undefined

Name of the tool being called

Record<string, unknown> | undefined

Tool arguments record

string

Working directory to resolve relative paths against

string | null

Absolute path to the target file, or null if not applicable