Skip to main content
Glama

read_document_parts

Read-only

List a document's structural parts in order, including part IDs, heading levels, and Markdown content. Use to identify anchors for moving work items.

Instructions

List a document's structural parts in order.

Use for structure: part ids (move_work_item_to_document anchors), heading levels, per-part Markdown. For plain reading use read_document; for a document's work items use list_work_items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID ('_default' = default space).
page_sizeNo
project_idYesPolarion project ID.
page_numberNo
document_nameYesDocument name within space_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
itemsYes
has_moreNo
page_sizeYes
total_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.0
    • changedOutput schema / properties / items / items / description
      Previous value: -"A single part (heading or work item) within a Polarion document."New value: +"Single part (heading or work item) within Polarion document."
  2. Changed2 schema fields changedv1.4.0
    • changedInput schema / properties / document_name / description
      Previous value: -"Document name within the space."New value: +"Document name within space_id."
    • changedInput schema / properties / space_id / description
      Previous value: -"Space ID containing the document."New value: +"Space ID ('_default' = default space)."
  3. Changed16 schema fields changedv1.1.0
    • removedInput schema / properties / page_number / description
      Removed value: -"Page number to retrieve (1-based, default 1)."
    • removedInput schema / properties / page_size / description
      Removed value: -"Number of parts per page (1-100, default 100)."
    • removedOutput schema / properties / has_more / description
      Removed value: -"True if more pages follow."
    • changedOutput schema / properties / items / items / description
      Previous value: -"A single part (heading or work item) within a Polarion document.\n\nField population varies by ``type``:\n\n* ``heading`` — text in ``title``, depth in ``level``, ``work_item_*``\n  fields point at the heading work item.\n* ``workitem`` — body in ``description`` (Markdown), metadata on\n  ``work_item_*``, ``content`` empty.\n* ``normal`` / ``wikiblock`` — body in ``content`` (Markdown).\n* ``toc`` / ``tof`` / ``page_break`` — widget placeholders, all body\n  fields empty. ``tof`` and ``page_break`` are inferred from the part\n  ID prefix because Polarion reports both as plain ``normal``.\n\nUse ``id`` as ``previous_part_id`` / ``next_part_id`` when calling\n``move_work_item_to_document``. ``work_item_id`` plugs straight into\n``get_work_item`` / ``list_work_item_links``."New value: +"A single part (heading or work item) within a Polarion document."
    • removedOutput schema / properties / items / items / properties / content / description
      Removed value: -"Part body in Markdown; empty unless body lives here."
    • removedOutput schema / properties / items / items / properties / description / description
      Removed value: -"Linked work item body as Markdown; only set on 'workitem' parts."
    • removedOutput schema / properties / items / items / properties / external / description
      Removed value: -"True when the part is re-used from another project (read-only)."
    • removedOutput schema / properties / items / items / properties / id / description
      Removed value: -"Short part identifier (e.g. 'workitem_MCPT-042')."
    • removedOutput schema / properties / items / items / properties / level / description
      Removed value: -"Heading level (1-4) for heading parts; 0 otherwise."
    • removedOutput schema / properties / items / items / properties / next_part_id / description
      Removed value: -"Short ID of the next part; empty on the last part."
    • removedOutput schema / properties / items / items / properties / outline_number / description
      Removed value: -"Hierarchical position (e.g. '1.2.3'); empty for prose / widgets."
    • removedOutput schema / properties / items / items / properties / title / description
      Removed value: -"Part title or heading text."
    • removedOutput schema / properties / items / items / properties / type / description
      Removed value: -"Part type; see class docstring for body-field mapping."
    • removedOutput schema / properties / items / items / properties / work_item_id / description
      Removed value: -"Linked Work Item ID; empty unless 'workitem' / 'heading'."
    • removedOutput schema / properties / items / items / properties / work_item_status / description
      Removed value: -"Linked work item status; empty unless 'workitem' / 'heading'."
    • removedOutput schema / properties / items / items / properties / work_item_type / description
      Removed value: -"Linked work item type; empty unless 'workitem' / 'heading'."
  4. First observedv0.9.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true, and the description is consistent, describing a read-only operation. It adds context about the type of output (structural parts, ids, headings, Markdown), but does not elaborate on other behaviors like pagination or potential exceptions. With annotations covering the safety profile, the description provides adequate but not extensive behavioral context.

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

Conciseness5/5

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

The description is three sentences, front-loaded with the primary purpose, followed by clear usage guidance. Every sentence serves a purpose, and there is no redundancy or unnecessary detail.

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

Completeness4/5

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

Given the presence of an output schema, the description adequately explains the type of data returned (structural parts with ids, headings, Markdown). It also provides context on when to use the tool. While it does not detail pagination or the exact output structure, it is reasonably complete for a listing tool with an output schema.

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

Parameters2/5

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

Schema description coverage is 60%, with descriptions for space_id, project_id, and document_name, but page_size and page_number lack descriptions. The tool description does not add any parameter-level information to compensate for the missing schema descriptions, leaving ambiguity for the pagination parameters.

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?

The description clearly states the tool lists a document's structural parts in order, specifies usage for structure (part ids, heading levels, per-part Markdown), and explicitly distinguishes from sibling tools read_document and list_work_items.

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?

The description provides explicit guidance: 'Use for structure...' and 'For plain reading use read_document; for a document's work items use list_work_items.' This clarifies when to use this tool versus alternatives.

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