Skip to main content
Glama

Import a page with its history (import)

import_page
Idempotent

Imports a Confluence page and all its versions into a Sophia space, preserving deterministic IDs and source-ID idempotency so repeated imports change nothing.

Instructions

Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Create a page with its WHOLE history. versions go in chronological order (oldest first): the last one is the current text, the earlier ones become history. Idempotent by source_id (created=false, nothing changes). The page id is deterministic (see import_ids), so you can write internal links to ANY page, imported or not, in one pass: /sophia/spaces/<KEY>/pages/<id from import_ids>. Same for files: write ![name](attachment:<id from import_ids>) and upload later with import_attachment. A 409 IMPORT_ID_TAKEN means the id belongs to something not imported from this source. Parents must exist first (import parents before children). position orders siblings. More than 500 versions (or over ~20 MB of text) are split automatically: the first request creates the page and the rest are appended in order. If a later request fails, the error says how many versions got in: continue with import_page_versions. parent_page_id takes a Sophia id or an already imported Confluence id. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files ![name](attachment:<uuid>); mentions @[Name](user:<uuid>); panels = blockquote whose first line is > [!INFO], > [!NOTE], > [!SUCCESS], > [!WARNING] or > [!ERROR]; internal links [Title](/sophia/spaces/<KEY>/pages/<pageId>); Kanbio ticket keys written as plain text (e.g. PROJ-12; not inside code or links) link automatically. Links may only point to http(s), mailto, /site-paths or #anchors; images only to attachment: or http(s).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "space_key": "<space_key>",
      "source_id": "<source_id>",
      "created_by_user_id": "<created_by_user_id>",
      "created_at": "<created_at>",
      "versions": "<versions>"
    },
    "name": "import_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoSophia page id. Defaults to the deterministic id import_ids gives for this source_id: leave it out unless you need another.
trashedNoSet when the page is in the Confluence trash.
positionNoOrder among siblings (0 first).
versionsYes
source_idYesThe id of this page in Confluence. Importing the same source id again changes nothing.
space_keyYesSpace key, e.g. ENG (uppercase letters and digits; see list_spaces).
created_atYesISO 8601 date-time, e.g. 2023-05-02T10:11:12.000Z.
parent_page_idNoParent page: its Sophia id (uuid) or its Confluence id (resolved through the import map; it must be imported already).
created_by_user_idYesSophia user id (uuid) from import_find_users or import_ensure_user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the annotations: no emails/notifications, no per-row audit events, idempotency keyed on source_id including the created=false outcome, deterministic ids enabling link writing in one pass, 409 IMPORT_ID_TAKEN semantics, and auto-splitting past 500 versions with partial-failure recovery. The annotations only declare idempotent/destructive flags; the description supplies the operational detail the agent actually needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries non-obvious information and the most critical constraints (auth, space prerequisite, idempotency) are front-loaded. It is a single undifferentiated block, though, and the idempotency point is stated twice (prose plus schema), which slightly hurts scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a high-complexity, 9-parameter nested tool with no output schema: it covers auth, prerequisites, idempotency, error codes, chunking, ordering, and the full Markdown/Sophia dialect rules needed to build valid bodies. Nothing required to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 89%, but the description still adds real meaning: versions are chronological with the last becoming current text, parent_page_id accepts either a Sophia uuid or an already-imported Confluence id, position orders siblings, and id defaults to the deterministic import_ids value. Only the version body/author fields are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a page with its WHOLE history') and immediately scopes it to the import flow, naming the sibling tools it depends on (import_create_space, import_ids, import_attachment, import_page_versions). An agent can tell it apart from create_page without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit preconditions (import:write token owned by a global admin, space must come from import_create_space, parents must be imported first) and names the alternative path on partial failure ('continue with import_page_versions'). Also states the when-not case with the exact error (403 IMPORT_SPACE_NOT_IMPORTED).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.