Skip to content

upload_artifact

Attach an artifact (plan document, image, or file) to a Polygraph session.

Provide the content inline via content, or point at a file on disk via filePath — exactly one of the two. Uploading with an existing name creates a new version. Uploaded artifacts appear in show_session output.

NameTypeRequiredDescription
sessionIdstringyesThe Polygraph session ID, or a supported Polygraph app session URL. Supported URL paths are /s/<session-id> and /orgs/<org-id>/sessions/<session-id>. URL inputs are normalized to the session ID; the MCP always uses the current Polygraph API configuration.
namestringyesThe artifact name. Reusing an existing name uploads a new version of that artifact.
kindenumnoThe artifact kind. One of: plan, image, file. Defaults to the CLI default when omitted. Use "plan" for plan documents, "image" for images, and "file" for other binaries.
formatenumnoThe content format for text artifacts. One of: markdown, html, text. Defaults to the CLI default when omitted.
contentstringnoInline artifact content (e.g. a plan document authored as text). Provide exactly one of content or filePath. The content is written to a temporary file and uploaded.
filePathstringnoAbsolute or relative path to a file to upload. Provide exactly one of content or filePath.