一键导入
tool-call-file-parameter-formatting
// Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref).
// Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref).
| name | tool-call-file-parameter-formatting |
| description | Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref). |
| metadata | {"version":"1.0"} |
Standardize file and URL inputs for tool calls using the file:{prefix}::{path_or_url} schema. You must determine the correct prefix by strictly analyzing the target tool's parameter definition.
When a tool parameter requires a file or URL, follow this process:
Inspect the Parameter Name and Parameter Description in the tool definition to determine the requirement:
base64 prefix.text prefix, the tool-call processor will read the file's contents and pass that text as the tool call parameter.text prefix.url, link, uri, or description says "pass the link" or "reference."url prefix.Construct the string using the format: file:{prefix}::{path_or_url}
base64, text, or url (determined from step 1)::files/path/to/file.exthttps://example.com/resourceBefore executing the tool call, perform this check:
[tool_name]. The parameter [param_name] has the description: [description]."[base64 | text | url] prefix."name: analyze_imageparameter: image_datadescription: "The base64 encoded contents of the image file."file:base64::files/images/chart.pngname: web_browserparameter: target_urldescription: "The URL to navigate to."target_url and expects a navigation link.file:url::https://google.comname: read_scriptparameter: script_contentdescription: "The text content of the python script."file:text::files/scripts/main.pyname: base64_image_processorparameter: image_inputdescription: "Image to process."file:base64::files/photos/portrait.jpgname: document_analyzerdescription: "Analyzes documents by reading their text content directly."parameter: documentdescription: "Document to analyze."file:text::files/reports/annual_report.txtname: fetch_resourceparameter: resource_urldescription: "The resource to fetch."_url, indicating a URL reference is expected.file:url::https://api.example.com/data.jsonname: process_fileparameter: input_filedescription: "Pass the base64-encoded file data for processing."file:base64::files/uploads/document.pdfname: batch_processorparameter: documents (type: array of strings)description: "List of base64-encoded file contents."["file:base64::files/doc1.pdf", "file:base64::files/doc2.pdf"]name: rag
parameter: attachment_urls (type: array of strings)description: "List of URLs pointing to the files to be ingested."attachment_urls and description "URLs pointing to the files" indicate URL references for each element.["file:url::https://example.com/doc1.pdf", "file:url::https://example.com/doc2.pdf"]Note: The
file:{prefix}::format works for both single string parameters and individual elements within array parameters.
url for local files.file:base64::... to a tool that only asks for a URL string (parameter name url).files/doc.pdf) without the file:... schema.External https:// URLs are valid file references — attachment_urls accepts them, and file:base64::https://...
/ file:text::https://... will inline external content. They may fail with a clear error when the operator has
disabled external egress (EXTERNAL_URL_FETCH_ENABLED=false) or the per-app config has opted out
(features.external_url_fetch.enabled: false). When that happens:
file:base64::https://... and file:text::https://..., retry by asking the user to upload the file to DIAL
and re-issue the call with files/... instead.attachment_urls, the same call may still succeed against a deployment that supports
features.url_attachments (the URL is forwarded as a reference_url and the deployment fetches the bytes
itself, never via QuickApps).Use before creating a PR or claiming a change is ready (or on explicit user invocation). Self-reviews the current diff against the patterns this team's reviewers consistently flag.
Use when the user asks to review, critique, validate, or approve a design doc under docs/designs/. Appends a Review Notes block; on explicit approval, strips notes and flips Status to Approved.