Awesome-omni-skill 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).
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/tool-call-file-parameter-formatting" ~/.claude/skills/diegosouzapw-awesome-omni-skill-tool-call-file-parameter-formatting && rm -rf "$T"
manifest:
skills/development/tool-call-file-parameter-formatting/SKILL.mdsource content
File Parameter Formatting
Purpose
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.
Instructions
When a tool parameter requires a file or URL, follow this process:
1. Analyze Tool Parameter Definition
Inspect the Parameter Name and Parameter Description in the tool definition to determine the requirement:
- Requirement: Base64 Content
- Clues: Description mentions "content," "base64," "encoded," "file data".
- Action: Use
prefix.base64
- Requirement: Plain Text
- Purpose: * Purpose: Use this mode to indicate the tool expects the actual text file content as the parameter. When a file is marked with the
prefix, the tool-call processor will read the file's contents and pass that text as the tool call parameter.text - Clues: Description mentions "text," "string content," "read file," or the file type is code/markdown/logs.
- Action: Use
prefix.text
- Purpose: * Purpose: Use this mode to indicate the tool expects the actual text file content as the parameter. When a file is marked with the
- Requirement: URL/Path Reference
- Clues: Parameter name contains
,url
,link
, or description says "pass the link" or "reference."uri - Action: Use
prefix.url
- Clues: Parameter name contains
2. Format the Value
Construct the string using the format:
file:{prefix}::{path_or_url}
- Prefix: One of
,base64
, ortext
(determined from step 1)url - Separator: Always use
:: - Path:
- For system files:
files/path/to/file.ext - For web resources:
https://example.com/resource
- For system files:
Thinking Process
Before executing the tool call, perform this check:
- Inspect Definition: "I am calling tool
. The parameter[tool_name]
has the description:[param_name]
."[description] - Deduce Type: "Based on the name/description, this tool expects [raw content | text string | URL reference]."
- Apply Format: "Therefore, I will use the
prefix."[base64 | text | url]
Examples
Example 1: Visual Analysis Tool
- Tool Definition:
:nameanalyze_image
:parameterimage_data
: "The base64 encoded contents of the image file."description
- Reasoning: Description explicitly asks for "encoded contents."
- Result:
file:base64::files/images/chart.png
Example 2: Browser Tool
- Tool Definition:
:nameweb_browser
:parametertarget_url
: "The URL to navigate to."description
- Reasoning: Parameter name is
and expects a navigation link.target_url - Result:
file:url::https://google.com
Example 3: Code Reader
- Tool Definition:
:nameread_script
:parameterscript_content
: "The text content of the python script."description
- Reasoning: Description asks for "text content."
- Result:
file:text::files/scripts/main.py
Example 4: Format Hint in Tool Name
- Tool Definition:
:namebase64_image_processor
:parameterimage_input
: "Image to process."description
- Reasoning: Tool name contains "base64," indicating it expects encoded content.
- Result:
file:base64::files/photos/portrait.jpg
Example 5: Format Hint in Tool Description
- Tool Definition:
:namedocument_analyzer
: "Analyzes documents by reading their text content directly."description
:parameterdocument
: "Document to analyze."description
- Reasoning: Tool description mentions "reading text content directly," suggesting text mode optimization.
- Result:
file:text::files/reports/annual_report.txt
Example 6: Format Hint in Argument Name
- Tool Definition:
:namefetch_resource
:parameterresource_url
: "The resource to fetch."description
- Reasoning: Parameter name ends with
, indicating a URL reference is expected._url - Result:
file:url::https://api.example.com/data.json
Example 7: Format Hint in Argument Description
- Tool Definition:
:nameprocess_file
:parameterinput_file
: "Pass the base64-encoded file data for processing."description
- Reasoning: Description explicitly states "base64-encoded file data."
- Result:
file:base64::files/uploads/document.pdf
Example 8: Multi-file upload tool (array parameter, base64 content)
- Tool Definition:
:namebatch_processor
:parameter
(type: array of strings)documents
: "List of base64-encoded file contents."description
- Reasoning: Description asks for "base64-encoded file contents" for each element.
- Result:
["file:base64::files/doc1.pdf", "file:base64::files/doc2.pdf"]
Example 9: Multi-file upload tool (array parameter, URL references)
- Tool Definition:
:namerag
:parameter
(type: array of strings)attachment_urls
: "List of URLs pointing to the files to be ingested."description
- Reasoning: Name
and description "URLs pointing to the files" indicate URL references for each element.attachment_urls - Result:
["file:url::https://example.com/doc1.pdf", "file:url::https://example.com/doc2.pdf"]
Note: The
format works for both single string parameters and individual elements within array parameters.file:{prefix}::
Common Mistakes
- ❌ Ignoring the tool description and defaulting to
for local files.url - ❌ Passing
to a tool that only asks for a URL string (parameter namefile:base64::...
).url - ❌ Passing raw paths (
) without thefiles/doc.pdf
schema.file:...