mcp-server-polarion
v2.1.0MCP server for Polarion ALM — read and write documents and work items
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_document_attachments
List a document's attachments as a paginated page. Document attachments only, not work item attachments. Returned id is the exact token a body references as attachment:{id}; Polarion never validates that reference, so a body may point at a missing file. Order is server-defined and not requestable. Use read_document for body context, list_documents for valid space/document ids.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
page_number | integer | |
page_size | integer |
get_document_attachment_content
Fetch a document attachment's content for viewing. PNG, JPEG, GIF, and WebP return as a viewable image; SVG returns its source markup as text. Any other extension is rejected before any request. Use get_work_item_attachment_content for work item attachments. Use list_document_attachments to discover attachment ids, file names, and sizes.
| Parameter | Type | Description |
|---|---|---|
attachment_id * | string | Attachment id (bare filename token) from list_document_attachments. |
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
list_work_item_attachments
List a work item's attachments as a paginated page. Work item attachments only -- use list_document_attachments for documents. Returned id is the exact token a body references as workitemimg:{id}; Polarion never validates that reference, so a body may point at a missing file. Order is server-defined and not requestable. Use list_work_items to discover valid ids.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID within project_id. |
page_number | integer | |
page_size | integer |
list_test_record_attachments
List a test record's attachments as a paginated page. Test record attachments only -- use list_work_item_attachments for work item files, list_document_attachments for document files. test_case_id is the full 'project/WI-id' form from list_test_records, not the short work item ID. Order is server-defined and not requestable. An empty result means the record has no attachments; verify the run/test-case/iteration coordinates via list_test_records if unsure.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
test_case_id * | string | Full test case work item ID 'project/WI-id' as returned by list_test_records. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
iteration | integer | Record iteration number (0-based). |
page_number | integer | |
page_size | integer |
get_work_item_attachment_content
Fetch a work item attachment's content for viewing. PNG, JPEG, GIF, and WebP return as a viewable image; SVG returns its source markup as text. Any other extension is rejected before any request. Use get_document_attachment_content for document attachments. Use list_work_item_attachments to discover attachment ids, file names, and sizes.
| Parameter | Type | Description |
|---|---|---|
attachment_id * | string | Attachment id (bare filename token) from list_work_item_attachments. |
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID within project_id. |
get_test_record_attachment_content
Fetch a test record attachment's content for viewing. PNG, JPEG, GIF, and WebP return as a viewable image; SVG returns its source markup as text. Any other extension is rejected before any request. Use get_document_attachment_content or get_work_item_attachment_content for the other domains. Use list_test_record_attachments to discover attachment ids, file names, and sizes.
| Parameter | Type | Description |
|---|---|---|
attachment_id * | string | Attachment id ({testCaseId}_{fileName} token) from list_test_record_attachments. |
project_id * | string | Polarion project ID. |
test_case_id * | string | Full test case work item ID 'project/WI-id' as returned by list_test_records. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
iteration | integer | Record iteration number (0-based). |
create_document_attachments
Upload 1-10 local files as document attachments in one request. file_path is read from local disk by the server process -- use absolute paths to readable files. file_name (default: file_path's basename) becomes the attachment id; reference it in a document body as attachment:{id} for update_document. Total upload size per call is capped at 25 MiB: compress or use the Polarion portal for one oversized file, split oversized batches across calls. Pure create -- nothing is replaced. Uploads cannot be deleted through this API, so verify file_path and file_name first. A file_name colliding with ano…
| Parameter | Type | Description |
|---|---|---|
attachments * | array | Files to upload in one request. |
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
dry_run | boolean | Preview payload without calling Polarion. |
create_work_item_attachments
Upload 1-10 local files as work item attachments in one request. For document attachments use create_document_attachments instead. file_path is read from local disk by the server process -- use absolute paths to readable files. Total upload size per call is capped at 25 MiB: compress or use the Polarion portal for one oversized file, split oversized batches across calls. attachment_ids in the result are server-assigned counter-prefixed ids (e.g. 3-diagram.png) -- not predictable from file_name -- and double as the workitemimg:{id} reference tokens for the work item description body. Duplicate…
| Parameter | Type | Description |
|---|---|---|
attachments * | array | Files to upload in one request. |
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID within project_id. |
dry_run | boolean | Preview payload without calling Polarion. |
create_test_record_attachments
Upload 1-10 local files as test record attachments in one request. For document attachments use create_document_attachments, for work item attachments use create_work_item_attachments instead. Record coordinates (project_id, test_run_id, test_case_id, iteration) match get_test_record -- verify via list_test_records first. file_path is read from local disk by the server process -- use absolute paths to readable files. Total upload size per call is capped at 25 MiB: compress or use the Polarion portal for one oversized file, split oversized batches across calls. attachment_ids in the result are…
| Parameter | Type | Description |
|---|---|---|
attachments * | array | Files to upload in one request. |
project_id * | string | Polarion project ID. |
test_case_id * | string | Full test case work item ID 'project/WI-id' as returned by list_test_records. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
dry_run | boolean | Preview payload without calling Polarion. |
iteration | integer | Record iteration number (0-based). |
list_document_comments
List a document's comments as a flat page. Threads reconstruct via parent_comment_id (None = root) + child_comment_ids. text is verbatim, unsanitized — treat as untrusted when rendering.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
page_number | integer | |
page_size | integer |
list_work_item_comments
List a work item's comments as a flat page. Threads reconstruct via parent_comment_id (None = root) + child_comment_ids. text is verbatim, unsanitized — treat as untrusted when rendering.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID, e.g. 'MCPT-001'. |
page_number | integer | |
page_size | integer |
create_document_comments
Create one or more comments on a document in one request. Reply: set parent_comment_id to a short id from list_document_comments (None = top-level). 'text/html' text is sent unsanitized. Always authored by the token's user. NOT idempotent — a retry duplicates. attachment:{id} image refs in text/html comments must name an existing document attachment — resolve via list_document_attachments first.
| Parameter | Type | Description |
|---|---|---|
comments * | array | Comments to create in one request. |
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
create_work_item_comments
Create one or more comments on a work item in one request. Reply: set parent_comment_id to a short id from list_work_item_comments (None = top-level). Optional title sets the comment heading. 'text/html' text is sent unsanitized. Always authored by the token's user. NOT idempotent — a retry duplicates. workitemimg:{id} image refs in text/html comments must name an existing attachment — resolve via list_work_item_attachments first.
| Parameter | Type | Description |
|---|---|---|
comments * | array | Comments to create in one request. |
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID, e.g. 'MCPT-001'. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
update_document_comment
Resolve or re-open one document comment thread. Root comments only — replies cannot be updated; pick a root id (parent_comment_id=None) from list_document_comments. Resolving the root resolves the whole thread. Idempotent.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Short comment ID (e.g. 'c42' from list_document_comments). |
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
resolved * | boolean | New resolved state. |
space_id * | string | Space ID ('_default' = default space). |
dry_run | boolean | Preview payload without calling Polarion. |
update_work_item_comment
Resolve or re-open one work item comment. Root comments only — replies cannot be updated; pick a root id (parent_comment_id=None) from list_work_item_comments. Resolving a root flips only that comment. Idempotent.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Short comment ID (e.g. 'c42' from list_work_item_comments). |
project_id * | string | Polarion project ID. |
resolved * | boolean | New resolved state. |
work_item_id * | string | Work item ID, e.g. 'MCPT-001'. |
dry_run | boolean | Preview payload without calling Polarion. |
list_documents
List a project's documents. Returns space_id + document_name — the inputs to every other document tool — plus type, status, updated, and creator/editor display names. Use get_document for author/editor ids. Discovery scan cached 60s.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
page_number | integer | |
page_size | integer |
get_document
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.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
include_home_page_content_html | boolean | Fill content_html with raw HTML for round-trip editing. |
read_document_parts
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.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
page_number | integer | |
page_size | integer |
read_document
Render a document end-to-end as flowing Markdown — THE way to read a body. Interleaves headings, work-item descriptions, and prose. Synthesis output: NEVER feed it to update_document — round-trip via get_document(include_home_page_content_html=True). For metadata-only extraction use list_work_items with SQL.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
page_number | integer | |
page_size | integer |
update_document
Update a document's metadata or body. PATCHes only supplied attributes — omitted fields stay unchanged; read BEFORE writing. home_page_content_html is raw Polarion HTML, sent verbatim — source from get_document(include_home_page_content_html=True); an empty string is rejected, pass '<p></p>' for near-empty. Body rules: - Inline <h1>..<h4> auto-create heading work items — THE way to add a heading. For body text or work items use create_work_items + move_work_item_to_document, NOT this tool. - A polarion_wiki macro name=module-workitem <div> leaves module unset — attach via move…
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name within space_id. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
auto_suspect | Flag linked work items suspect on change. | |
custom_fields | Partial; rich-text values as {'type':'text/html','value':...}. | |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
home_page_content_html | New body as raw HTML from get_document(include_home_page_content_html=True); '' rejected; anchorless blocks get id= auto-stamped. New tables, captions, images, or other Polarion constructs: call get_h… | |
rendering_layout_types | Work item type IDs that render their fields in this document; REPLACES the current set, so pass every type to keep. | |
status | New status; prefer workflow_action for real transitions. | |
title | New document title. | |
type | New document type (e.g. 'req_specification'). | |
uses_outline_numbering | Enable auto outline numbers (1, 1.1, ...). | |
workflow_action | Workflow action ID. |
create_document
Create a document in a space. document_name must be unique in the space — a duplicate name conflicts; check list_documents first. type/status and custom_fields keys are validated on write — resolve ids via list_document_enum_options first. Set rendering_layout_types to every work item type the document will hold — without a layout their fields do not render in the Polarion UI. Resolve those ids via list_work_item_enum_options; a later update_document must resend every type to keep. home_page_content is Markdown (greenfield only), converted to sanitized HTML. Markdown tables get native…
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Document name (e.g. 'MySpecV1'); unique within space_id, appears in the document URL. |
project_id * | string | Polarion project ID. |
space_id * | string | Space ID ('_default' = default space). |
title * | string | Human-readable document title. |
type * | string | Document type (e.g. 'req_specification', 'generic'). |
auto_suspect | Flag linked work items suspect on change. | |
custom_fields | Keyed by Polarion field ID (copy keys from a sibling document); rich-text values as {'type':'text/html','value':...}. | |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
home_page_content | Markdown body; converted to sanitized HTML. | |
rendering_layout_types | Work item type IDs the document will hold (e.g. ['softwarerequirement']); each gets a section layout. | |
status | Initial workflow status (project default if omitted). | |
uses_outline_numbering | Enable auto outline numbers (1, 1.1, ...). |
copy_document
Copy a document, duplicating its structure, body, and contained work items. Rebuilding via create_document/update_document loses the contained items. target_document_name must be free at the destination — check list_documents first. Destination defaults to the source project/space. link_original_items_with_role is validated against the TARGET project's workitem-link-role enum; remove_outgoing_links strips links carried over from the source.
| Parameter | Type | Description |
|---|---|---|
document_name * | string | Source document name. |
project_id * | string | Source project ID. |
space_id * | string | Source space ID ('_default' = default space). |
target_document_name * | string | New document name; must not already exist at the destination. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
link_original_items_with_role | Link each copied item back to its original with this workitem-link-role id (e.g. 'duplicates'). | |
remove_outgoing_links | Strip outgoing links from copied items (kept if omitted). | |
revision | Copy the source as of this revision (HEAD if omitted). | |
target_project_id | Destination project (source project if omitted). | |
target_space_id | Destination space (source space if omitted). |
list_work_item_enum_options
List valid enum option ids for a work item field of a given type. Call this before create_work_items / update_work_items — invalid enum ids are rejected on write. An unknown work_item_type silently falls back to '~', so verify the type id first.
| Parameter | Type | Description |
|---|---|---|
field_id * | string | e.g. 'status', 'type', 'severity', 'priority', or a custom field id. |
project_id * | string | Polarion project ID. |
work_item_type * | string | e.g. 'task', 'requirement'; '~' = type-agnostic. |
page_number | integer | |
page_size | integer |
list_document_enum_options
List valid enum option ids for a document field of a given type. Call this before create_document / update_document — invalid enum ids are rejected on write. An unknown document_type silently falls back to '~', so verify the type id first.
| Parameter | Type | Description |
|---|---|---|
document_type * | string | e.g. 'systemReqSpecification'; '~' = type-agnostic. |
field_id * | string | e.g. 'status', 'type', or a custom field id. |
project_id * | string | Polarion project ID. |
page_number | integer | |
page_size | integer |
list_work_item_links
List a work item's links, one direction per call. Forward carries role (parent, verifies, …) and suspect; back is a Lucene fallback that drops role (always None) — recover it via forward on the source.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID (e.g. 'MCPT-001'). |
direction | string | |
page_number | integer | |
page_size | integer |
create_work_item_links
Create 1-50 outgoing links from one source work item, atomically. Role and target existence are validated before writing. Per spec: target_project_id defaults to the source, revision pins (else HEAD), suspect flags re-review. A duplicate role+target rolls back the whole batch — re-query list_work_item_links before retrying. link_ids are the delete-path ids, input order. Phantom success: a document-attached source already has an auto-created heading link; a NEW same-role link reports created but is NOT persisted — verify with list_work_item_links.
| Parameter | Type | Description |
|---|---|---|
links * | array | Links to create under the source work item (1-50). |
project_id * | string | Source work item's project ID. |
work_item_id * | string | Source work item ID. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
delete_work_item_links
Delete 1-50 outgoing links from one source work item. Outgoing only — delete a back link from its source item instead. Refs from list_work_item_links(direction="forward") or a prior create. Stale refs never fail: results split into deleted_link_ids / not_found_link_ids.
| Parameter | Type | Description |
|---|---|---|
links * | array | Existing outgoing links to delete (1-50). |
project_id * | string | Source work item's project ID. |
work_item_id * | string | Source work item ID. |
dry_run | boolean | Preview payload without deleting; the pre-read still queries Polarion. |
update_work_item_link
Set suspect and/or revision on one existing outgoing link. Identify the link via list_work_item_links(direction="forward") — role + target address one link; copy the role exactly as listed. None = unchanged; at least one of suspect / revision required. One link per call.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Source work item's project ID. |
role * | string | Role id of the existing link. |
target_work_item_id * | string | Target work item ID. |
work_item_id * | string | Source work item ID. |
dry_run | boolean | Preview payload without calling Polarion. |
revision | New revision pin; None = unchanged. | |
suspect | New suspect flag; None = unchanged. | |
target_project_id | Defaults to the source's project. |
move_work_item_to_document
Move an existing work item into a document at a given position. THE attach path: atomically sets module and inserts a part. Headings are rejected — add headings via update_document <hN>. An item already in a document is moved, not copied. At most one of previous_part_id (AFTER) / next_part_id (BEFORE); omit both to append. Part ids from read_document_parts. Auto-creates one link to the enclosing heading; a later same-role create_work_item_links reports created but is NOT persisted.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
target_document_name * | string | Target document name within target_space_id. |
target_space_id * | string | Target space ID ('_default' = default space). |
work_item_id * | string | Work item ID (e.g. 'MCPT-042'). |
dry_run | boolean | Preview payload without calling Polarion. |
next_part_id | Insert BEFORE this part ID; exclusive with previous_part_id. | |
previous_part_id | Insert AFTER this part ID; exclusive with next_part_id. |
move_work_item_from_document
Detach a work item from its document — the ONLY detach path. NOT idempotent: an already free-floating item fails — confirm attachment first (get_work_item: non-empty space_id). The item is preserved and re-attachable via move_work_item_to_document. Headings are detachable too.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID (e.g. 'MCPT-042'). |
dry_run | boolean | Preview payload without calling Polarion. |
list_projects
List accessible Polarion projects — the source of project ids. Lucene query allows trailing wildcards (name:ILCU*); leading ones are rejected.
| Parameter | Type | Description |
|---|---|---|
page_number | integer | |
page_size | integer | |
query | Optional Lucene filter (e.g. 'name:ILCU*'); trailing wildcards only. |
get_sql_query_recipes
Fetch copy-paste SQL recipes for the list_work_items SQL:(...) prefix. Call before writing any SQL query (document scope, custom-field, traceability); adapt a recipe instead of hand-writing joins. Includes the table schema.
get_html_recipes
Fetch the required HTML templates for tables, captions, links, and widgets written via update_work_items / update_document. Any new <table>, numbered caption, work-item / cross-reference / wiki-page link, or TOC / Table-of-Figures widget must be adapted from these templates — plain hand-written markup renders unstyled and breaks numbering. Also covers macro-id and metadata-scope caveats.
create_test_records
Create 1-50 test records on one test run, recording which test cases were executed with what result. Use list_test_records to read them back; create_test_runs creates the run itself. Atomic: one bad item rejects the whole batch. Posting the same test_case_id again starts a new iteration rather than replacing it -- use separate calls, not duplicates in one batch. comment is sent verbatim in comment_format, no Markdown conversion. Returns record_ids as full 5-segment ids -- never shortened. result is validated against the project's testing enumerations; defect must reference an existing work i…
| Parameter | Type | Description |
|---|---|---|
items * | array | Test records to create in one request (1-50). |
project_id * | string | Polarion project ID. |
test_run_id * | string | Test run ID. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
update_test_records
Set result, comment, and/or defect link on 1-50 test records of one test run in a single bulk PATCH. Run-level fields (title, status, group_id) — use update_test_runs instead. Atomic: one bad item rejects the whole batch; no record changes. record_id must be copied verbatim from list_test_records — never decomposed. comment is sent verbatim; Polarion stores it as text/html regardless of the comment_format sent, so a later read always shows text/html. Returns the echoed record_ids only — re-read via list_test_records. result must already be a value the run uses (discover via list_test_…
| Parameter | Type | Description |
|---|---|---|
items * | array | Per-record changes (1-50); unset fields stay unchanged. |
project_id * | string | Polarion project ID. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
list_test_records
List execution records of one test run — one row per test case iteration. For run metadata use get_test_run. Filter by result (e.g. 'failed') or omit for all; not-yet-executed records have empty result. Lucene query is NOT supported here. Returns summaries — id is the exact value update_test_records takes as record_id; defect_id links the failure work item.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
page_number | integer | |
page_size | integer | |
result | Filter by result enum ID (e.g. 'passed', 'failed', 'blocked'). |
get_test_record
Get full detail of one test-case iteration inside a test run: execution comment and test-case revision. Use list_test_records for run-wide summaries, get_test_run for run metadata. comment_html carries the record's raw HTML comment; plain-text comments return as-is. Verify coordinates via list_test_records if not found.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
test_case_id * | string | Full test case work item ID 'project/WI-id' as returned by list_test_records. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
iteration | integer | Record iteration number (0-based). |
create_test_runs
Create 1-50 test runs in one project in one bulk request. id is required per item — never auto-generated. type/status are validated against the project's testing enumerations and template_id against existing templates (list_test_runs(templates=True)). custom_fields keys are validated against a sample of existing runs; enum-typed custom values are not (test runs have no options API). Atomic: one bad item rejects the whole batch.
| Parameter | Type | Description |
|---|---|---|
items * | array | Test runs to create in one request (1-50). |
project_id * | string | Polarion project ID. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
update_test_runs
Update fields on 1-50 existing test runs in one bulk PATCH; unset fields stay unchanged. Atomic: one bad item rejects the whole batch. Writable: title, status, group_id, custom_fields. status is validated against the project's testing enumerations. custom_fields is partial; keys are validated against a sample of existing runs, values are not (test runs have no options API). finishedOn is server-managed — not settable. Returns ids only — re-read via list_test_runs.
| Parameter | Type | Description |
|---|---|---|
items * | array | Per-run changes (1-50); unset fields stay unchanged. |
project_id * | string | Polarion project ID. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
list_test_runs
List / search test runs in a project. Returns run instances by default; set templates=True for the reusable template blueprints. Filter by person with author.name (exact, quoted) — author.id does not match on test runs; discover the full name from an unfiltered page first.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
page_number | integer | |
page_size | integer | |
query | Optional Lucene filter (e.g. 'status:open', 'groupId:Release-2.5', 'author.name:"Jane Doe"', 'HAS_VALUE:<field>' to match runs with that field populated). | |
templates | boolean | List template blueprints instead of actual run instances. |
get_test_run
Get full details of one test run by ID. Returns writable fields (title, status, group_id, custom_fields) plus read-only context: test-case selection, template provenance, author, and timestamps. include_home_page_content_html=True fills content_html with the raw HTML report body; it stays empty when use_report_from_template is true. Never feed back a blanked (flag=False) body.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
test_run_id * | string | Test run ID (e.g. 'TR-2026-01'). |
include_home_page_content_html | boolean | Fill content_html with the run's raw HTML report body. |
create_work_items
Create 1-50 work items in one project in a single bulk request. Items are created free-floating — place into a document with move_work_item_to_document (this tool cannot). Atomic: one bad item rejects the whole batch. description is Markdown (greenfield only); later edits are raw-HTML round-trip via get_work_item(include_description_html=True) and update_work_items — formats never mix. Markdown tables get native Polarion styling; a paragraph starting 'Table:' directly after a table becomes a numbered caption widget. Enum values and custom_fields keys are validated on write — resolve id…
| Parameter | Type | Description |
|---|---|---|
items * | array | Work items to create in one request (1-50). |
project_id * | string | Polarion project ID. |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
update_work_items
Update fields on 1-50 existing work items in one bulk PATCH; unset fields stay unchanged. hyperlinks/assignee_ids REPLACE the stored lists: even to add ONE entry, call get_work_item on the target BEFORE updating and resubmit every existing entry plus the new one — anything omitted is silently deleted. Atomic: one bad item rejects the whole batch. description_html is raw Polarion HTML, sent verbatim — source from get_work_item(include_description_html=True); greenfield bodies use create_work_items Markdown, formats never mix. To add a table, caption, image, link, or widget, call get_html_r…
| Parameter | Type | Description |
|---|---|---|
items * | array | Per-item changes (1-50). hyperlinks/assignee_ids REPLACE the stored lists — read each item first and pass full lists, not deltas. |
project_id * | string | Polarion project ID. |
change_type_to | New work-item type for EVERY item; RESETS status. | |
dry_run | boolean | Preview payload without writing; guards still query Polarion. |
workflow_action | Workflow action ID (e.g. 'close'); applies to EVERY item. |
list_work_items
List / search work items in a project. Leading Lucene wildcards are rejected; module and body text are NOT Lucene-indexed — scope by document via SQL:(...) or read_document_parts, never a Lucene module term. For SQL:(...), call get_sql_query_recipes first and adapt a recipe — never hand-write SQL. For one known id, use get_work_item instead of scanning.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
page_number | integer | |
page_size | integer | |
query | Optional Lucene filter (e.g. 'type:requirement', 'title:SRS*') OR a 'SQL:(...)' prefix for native SQL. |
get_work_item
Get full details of one work item by ID. include_description_html=True fills description_html with raw HTML — the required source for update_work_items description_html. Never feed back a blanked (flag=False) body.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID (e.g. 'MCPT-001'). |
include_description_html | boolean | Fill description_html with raw HTML for round-trip editing. |
read_work_item
Read one work item with its body rendered as Markdown. Synthesis output — collapses Polarion anchors; NEVER feed it to update_work_items. Edits round-trip via get_work_item(include_description_html=True) instead.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Polarion project ID. |
work_item_id * | string | Work item ID (e.g. 'MCPT-001'). |