All tools
ToolRead

Prepare chart or table artifact

prepare_chart_table_artifact

Use when the user supplies raw CSV, TSV, Markdown pipe table, or JSON rows that should become a Prism table or chart artifact.

When to use it

Use when the user supplies raw CSV, TSV, Markdown pipe table, or JSON rows that should become a Prism table or chart artifact.

Typical workflow

Normalize raw data, inspect warnings, validate the returned artifactType/spec, save with create_artifact, then insert saved artifacts into drafts with insert_article_visual_block.

What it returns

A normalized table or chart artifact payload, normalized columns, row count, warnings, validation/save inputs, insertion guidance, and screenshot-image guidance.

Avoid using it when

Avoid for screenshots, rendered chart images, or tables embedded only as pixels; upload those as article images unless the user also supplies underlying data.

Advanced input contract

Agent hosts use this JSON Schema to validate the exact input shape.

View full registry notes

Normalize raw CSV, TSV, Markdown table, or JSON row data into a Prism table or chart artifact payload before saving. Safe inline Markdown in table labels/cells and chart category labels is preserved for bold, italic, strikethrough, code, and links. This is read-only preparation: validate the returned artifactType/spec, save with create_artifact, and insert into article drafts with insert_article_visual_block. Screenshots or rendered chart images should use upload_article_image instead; this tool does not OCR images. Use when: Use when the user supplies raw CSV, TSV, Markdown pipe table, or JSON rows that should become a Prism table or chart artifact. Avoid when: Avoid for screenshots, rendered chart images, or tables embedded only as pixels; upload those as article images unless the user also supplies underlying data.

View JSON Schema
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "source": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "delimited_text"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100000,
              "description": "CSV, TSV, or pasted delimited text with a header row. String headers/cells may use safe inline Markdown; keep chart value columns numeric."
            }
          },
          "required": [
            "kind",
            "text"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "markdown_table"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100000,
              "description": "Markdown pipe table text with a header and separator row. Safe inline emphasis, code, and links are preserved in visible labels and cells."
            }
          },
          "required": [
            "kind",
            "text"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "json_rows"
            },
            "columns": {
              "type": "array",
              "maxItems": 80,
              "items": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 160
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            },
            "rows": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1000,
              "items": {
                "type": "object"
              }
            }
          },
          "required": [
            "kind",
            "rows"
          ],
          "additionalProperties": false
        }
      ]
    },
    "preferredArtifactType": {
      "type": "string",
      "enum": [
        "auto",
        "table",
        "chart"
      ],
      "default": "auto"
    },
    "chart": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "bar",
            "line",
            "area",
            "pie"
          ]
        },
        "xKey": {
          "type": "string",
          "maxLength": 120
        },
        "yKey": {
          "type": "string",
          "maxLength": 120
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "source"
  ],
  "additionalProperties": false
}

Useful next tools