Skip to main content
Glama

get_document

Read-only

Retrieve a Polarion document's metadata including title, type, status, timestamps, editors, and custom fields. Optionally include raw home page content HTML for round-trip editing.

Instructions

Get a document's metadata: title/type/status/timestamps/editors/custom fields.

include_home_page_content_html=True fills content_html with raw homePageContent HTML — the required source for update_document(home_page_content_html=...). That body is inline prose only — headings and embedded work items render via read_document. Never feed back a blanked (flag=False) body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID ('_default' = default space).
project_idYesPolarion project ID.
document_nameYesDocument name within space_id.
include_home_page_content_htmlNoFill content_html with raw HTML for round-trip editing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
titleYes
statusNo
createdNo
updatedNo
author_idNo
author_nameNo
auto_suspectNo
content_htmlNo
custom_fieldsNo
last_updated_by_idNo
last_updated_by_nameNo
rendering_layout_typesNo
uses_outline_numberingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.0
    • addedOutput schema / properties / rendering_layout_types
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed10 schema fields changedv2.0.0
    • addedInput schema / properties / include_home_page_content_html
      Added value: +{
      +  "default": false,
      +  "description": "Fill content_html with raw HTML for round-trip editing.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / include_homepage_content_html
      Removed value: -{
      -  "default": false,
      -  "description": "Fill content_html with raw HTML for round-trip editing.",
      -  "type": "boolean"
      -}
    • changedOutput schema / description
      Previous value: -"Full details of a Polarion document returned by ``get_document``."New value: +"Full Polarion document detail from ``get_document``."
    • removedOutput schema / properties / author
      Removed value: -{
      -  "default": "",
      -  "type": "string"
      -}
    • addedOutput schema / properties / author_id
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedOutput schema / properties / author_name
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedOutput schema / properties / created
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • removedOutput schema / properties / last_updated_by
      Removed value: -{
      -  "default": "",
      -  "type": "string"
      -}
    • addedOutput schema / properties / last_updated_by_id
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedOutput schema / properties / last_updated_by_name
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv1.4.1
    • addedOutput schema / properties / auto_suspect
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / uses_outline_numbering
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  4. Changed6 schema fields changedv1.4.0
    • changedInput schema / properties / document_name / description
      Previous value: -"Document name within the space (spaces handled automatically)."New value: +"Document name within space_id."
    • changedInput schema / properties / include_homepage_content_html / description
      Previous value: -"When True, fill ``content_html`` with raw HTML for round-trip editing."New value: +"Fill content_html with raw HTML for round-trip editing."
    • changedInput schema / properties / space_id / description
      Previous value: -"Space ID containing the document (e.g. '_default')."New value: +"Space ID ('_default' = default space)."
    • addedOutput schema / properties / author
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedOutput schema / properties / last_updated_by
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedOutput schema / properties / updated
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
  5. Changed6 schema fields changedv1.1.0
    • changedOutput schema / description
      Previous value: -"Full details of a Polarion document returned by ``get_document``.\n\n``content_html`` is the round-trip pair for\n``update_document(home_page_content_html=...)`` — populated only when\n``include_homepage_content_html=True``. It is the inline prose only;\nheading text and embedded work-item bodies live in separate work items,\nso ``read_document`` is the assembled-body view.\n\n``custom_fields`` mirrors the keys configured on the document type:\nrich-text values stay as ``{'type': 'text/html', 'value': '<...>'}``\ndicts so the shape round-trips back unchanged."New value: +"Full details of a Polarion document returned by ``get_document``."
    • removedOutput schema / properties / content_html / description
      Removed value: -"Raw Polarion HTML body; empty unless the read flag was True."
    • removedOutput schema / properties / custom_fields / description
      Removed value: -"Project-defined custom fields keyed by field ID."
    • removedOutput schema / properties / status / description
      Removed value: -"Document workflow status (e.g. 'draft', 'approved')."
    • removedOutput schema / properties / title / description
      Removed value: -"Document title."
    • removedOutput schema / properties / type / description
      Removed value: -"Document type (e.g. 'req_specification')."
  6. First observedv0.9.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true, but the description adds valuable behavioral detail: the nature of content_html (raw homePageContent HTML, inline prose only), the dependency on it for update_document, and the warning not to feed back a blanked body. These go beyond the annotation and help the agent avoid mistakes.

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 concise yet information-dense. It uses two short paragraphs: the first states the core purpose, the second details the optional flag and critical caveats. No filler words; every sentence contributes actionable guidance.

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?

Given the output schema exists (handling return structure), the description covers the essential aspects: the tool's purpose, the optional behavior, and cross-tool dependencies. It also warns about a subtle failure mode (blanked body). This is complete for a read-only metadata retrieval tool.

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?

Since the schema already provides descriptions for all four parameters (100% coverage), the baseline is 3. The description adds substantial meaning for include_home_page_content_html, explaining its purpose for round-trip editing and its relationship to raw HTML, which exceeds the schema's one-line description. Other parameters are already well-schema-described.

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 explicitly states the tool retrieves document metadata and enumerates the fields (title, type, status, timestamps, editors, custom fields). This clearly distinguishes it from sibling tools that handle attachments or content rendering.

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 usage guidance by naming read_document as the alternative for rendered content with headings and embedded work items, and by linking include_home_page_content_html to update_document for round-trip editing. This tells the agent 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.