Skip to main content
Type: Agent Built-in | Server path: N/A | PCID required: No Built-in and always available to agents (but not available via API). These tools are part of the agent runtime — no MCP server configuration or setup required. They are automatically available to every Claude and GPT agent. Unlike MCP server tools, artifact tools cannot be invoked directly via the API; they are only used by agents during conversation to create downloadable files, read truncated results, and list artifacts.

Tools

ToolDescription
write_artifactCreate a downloadable file from text content
write_artifact_from_urlCreate a downloadable file by fetching from a URL
read_artifactRead content from an artifact by file ID (supports smart reading options)
list_artifactsList all artifact files in the current chat session

write_artifact

Create a downloadable file from text content. Use when the user explicitly requests “save as”, “export”, “create file”, or when generating code files. Parameters:
ParameterTypeRequiredDescription
filenamestringYesName of the file with extension (e.g. "data.csv")
contentstringYesThe file content as a string
fileTypestringYesFile extension/type: csv, json, txt, md, html, js, ts, py
Response fields:
FieldTypeDescription
successbooleanWhether the artifact was created
filenamestringName of the created file
urlstringDownload URL for the file
idstringFile ID (for referencing in read_artifact)
mimeTypestringMIME type of the file
sizenumberFile size in bytes

write_artifact_from_url

Create a downloadable file by fetching content from a URL. Use when you have a download URL from another tool (e.g., OneDrive, Google Drive, Slack) and want to save it as an artifact. The content is fetched server-side and never enters the agent’s context, making it efficient for large files. Parameters:
ParameterTypeRequiredDescription
sourceUrlstringYesThe URL to fetch the file content from
filenamestringYesName for the artifact file with extension (e.g. "report.pdf", "data.xlsx")
authHeadersobjectNoOptional authentication headers to include when fetching from the source URL
Response fields:
FieldTypeDescription
successbooleanWhether the artifact was created
filenamestringName of the created file
urlstringDownload URL for the file
idstringFile ID
mimeTypestringMIME type of the file
sizenumberFile size in bytes
Note: URL fetches are subject to SSRF protection. Localhost and private IP URLs are blocked. Maximum download size is 100MB.

read_artifact

Retrieve content from an artifact file by its ID. Use when a tool result shows _artifact.truncated: true to get the full data. Supports selective reading to avoid fetching entire large files. Parameters:
ParameterTypeRequiredDescription
file_idstringYesThe file ID of the artifact to read (e.g., _artifact.id from a truncated result)
searchstringNoSearch pattern to find in the content (case-insensitive). Returns matching lines with context.
context_linesnumberNoNumber of lines to show before and after each search match (default: 2)
start_linenumberNoStart line number for line range extraction (1-indexed, inclusive)
end_linenumberNoEnd line number for line range extraction (1-indexed, inclusive)
json_pathstringNoDot notation path to extract from JSON content (e.g. "data.items", "results[0]")
array_indicesstringNoComma-separated indices or ranges to extract from array content (e.g. "0,1,2" or "0-5")
Response fields:
FieldTypeDescription
successbooleanWhether the read succeeded
contentstringFile content (full or extracted)
sizenumberFile size in bytes
filenamestringFile name
mimeTypestringMIME type
modestringWhen using smart options: search, line_range, json_path, or array_indices

list_artifacts

List all artifact files in the current chat session. Returns file names, IDs, sizes, MIME types, and creation dates. Parameters:
ParameterTypeRequiredDescription
filter_typestringNoFilter by MIME type prefix (e.g. "text/", "application/json", "image/")
filter_namestringNoFilter by filename pattern (case-insensitive substring match)
Response fields:
FieldTypeDescription
successbooleanWhether the list succeeded
totalCountnumberTotal number of artifacts
filteredCountnumberNumber after applying filters
artifactsobject[]Array of artifact objects
artifacts[].idstringFile ID
artifacts[].filenamestringFile name
artifacts[].mimeTypestringMIME type
artifacts[].sizenumberFile size in bytes
artifacts[].sizeFormattedstringHuman-readable size (e.g. “1.2 MB”)
artifacts[].createdAtstringCreation timestamp