Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JIRA_USERNoJira account email
TR_TYPE_IDNoDefault case type
JIRA_BASE_URLNoJira base URL, e.g. https://your-org.atlassian.net
TESTRAIL_USERYesTestRail account email
JIRA_API_TOKENNoJira API token from https://id.atlassian.com/manage-profile
TR_PRIORITY_IDNoDefault priority (3 = Medium)3
TR_TEMPLATE_IDNoDefault template ID (2 = Test Case (Steps))2
CONFLUENCE_EMAILNoConfluence email (defaults to JIRA_USER)
TESTRAIL_API_KEYYesTestRail API key from My Settings → API Keys
TESTRAIL_BASE_URLYesTestRail base URL, e.g. https://your-org.testrail.io
TESTRAIL_SUITE_IDNoDefault suite ID
CONFLUENCE_BASE_URLNoConfluence base URL
TESTRAIL_PROJECT_IDNoDefault project ID
CONFLUENCE_API_TOKENNoConfluence API token (defaults to JIRA_API_TOKEN)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_projectsA

List all TestRail projects visible to the configured user.

create_suiteB

Create a new TestRail suite in a project (only works on multi-suite projects).

project_id defaults to TESTRAIL_PROJECT_ID from env.

list_suitesA

List suites under a TestRail project.

project_id defaults to TESTRAIL_PROJECT_ID from env when omitted or 0.

list_sectionsB

List sections in a suite, returning {id, name, parent_id}.

Defaults to TESTRAIL_PROJECT_ID / TESTRAIL_SUITE_ID from env when omitted.

find_populated_sectionA

Find a section that has at least min_cases real cases — useful as a house-style anchor when bootstrapping a new feature. Returns the first section meeting the threshold (sections are scanned in TestRail order).

search_test_casesA

List test cases in a project, optionally filtered by suite, section, or title substring.

Both project_id and suite_id fall back to env defaults (TESTRAIL_PROJECT_ID / TESTRAIL_SUITE_ID) when omitted or 0.

get_test_caseB

Fetch a single test case by its TestRail ID.

create_test_caseC

Create a single test case in a TestRail section.

case should look like: { "title": "...", "preconditions": "...", "steps": [{"step": "...", "expected": "..."}, ...] }

get_or_create_sectionA

Resolve a section hierarchy like Auth > Login > Edge Cases, creating missing parents as needed. Returns {"section_id": int, "path": str}.

Defaults to TESTRAIL_PROJECT_ID / TESTRAIL_SUITE_ID from env when not provided.

preview_house_styleC

Return up to N existing cases from the target section in style-example format.

Use this to preview what Claude will see as "house style" before generating.

prepare_cases_from_textA

Fetch the inputs needed to generate TestRail cases from a free-form spec.

This is an MCP-native pattern: the server doesn't call an LLM. It returns the spec, the house-style anchors, the target section, and an instructions block that tells the calling Claude how to generate cases and where to push them.

Targeting modes:

  • section_id — push into an existing section ID later

  • section_hierarchy — like Auth > Login; missing nodes will be created when you call add_test_cases_bulk. Defaults come from TESTRAIL_PROJECT_ID and TESTRAIL_SUITE_ID env.

House-style matching (default on): the server pulls a few existing cases from the target section (or a fallback populated section) so the calling Claude can match the local tone, naming, and step granularity. Override the style source with house_style_section_id to pull anchors from a different "golden" section.

prepare_cases_from_jiraC

Fetch a Jira ticket + house-style anchors. Returns the context the calling Claude needs to generate TestRail cases. Example: issue_key='ABC-123'.

prepare_cases_from_confluenceB

Fetch a Confluence page + house-style anchors. Returns the context the calling Claude needs to generate TestRail cases. page_id is the numeric ID from the page URL: /wiki/spaces/X/pages/<page_id>.

add_test_cases_bulkA

Push a batch of test cases to TestRail in one call. Returns the IDs created.

cases items are in the shape returned by prepare_cases_* — each has {title, preconditions, steps:[{step, expected}]}. The server maps that into TestRail's payload format (custom_steps_separated etc.).

Targeting: either section_id directly, or section_hierarchy like 'Auth > Login > Smoke' — missing nodes are created.

dedupe_against_sectionA

Check generated cases against what's already in a TestRail section.

Uses title-token overlap (no embeddings) — fast, deterministic. Returns:

  • kept: list of {case, reason} that look new

  • duplicates: list of {case, existing_id, existing_title, overlap} threshold is the minimum token-overlap (0..1) to flag as duplicate.

prepare_lintB

Return the case batch alongside lint instructions for the calling Claude to evaluate.

No LLM call happens server-side — the client Claude reviews the cases using its own context and reports back, paid for by the user's subscription.

prepare_coverage_gapsB

Return the spec and the existing case titles, plus instructions for the calling Claude to find missing coverage. No LLM call happens server-side.

list_runsC

List test runs in a project.

Filters:

  • suite_id — only runs of this suite

  • is_completed — True for closed/archived runs only, False for open only

get_runC

Fetch the full metadata of a single test run.

get_tests_in_runC

Tests in a run with their current status (current = latest result).

get_results_for_runC

All result entries for a run — includes comments, defects, who tested when.

prepare_run_summaryA

Pull run metadata, statuses, and failure comments — return the structured payload + report instructions for the calling Claude to synthesise into Markdown.

No LLM call happens server-side. Claude in the client writes the report.

include_passed_titles=False (default) keeps the payload compact for big runs. Set True only for tiny runs (<50 tests) when full granularity is useful.

create_runC

Create a new test run.

By default includes every case in the suite (include_all=True). Pass an explicit case_ids list and set include_all=False to scope the run.

update_runA

Patch an existing test run's metadata. Pass only fields you want to change.

close_runC

Mark a test run as completed/archived. This is irreversible in TestRail.

add_resultA

Post a single test result by case_id (TestRail looks up the test inside the run).

status accepts a string ("passed" | "failed" | "blocked" | "retest" | "untested") or a raw TestRail status_id (1..5 by default). elapsed is a TestRail time string ("30s", "1m 30s", "1h 5m"). defects is a comma-separated list of bug-tracker IDs ("BUG-1, BUG-2").

add_bulk_resultsA

Post many results in one TestRail call (much faster than looping add_result).

Each entry in results must have at least case_id and status (string or id). Optional per-entry fields: comment, defects, elapsed, version, assignedto_id.

update_caseA

Patch an existing test case. fields is forwarded to TestRail as-is.

Common keys: title, custom_preconds, custom_steps_separated, priority_id, type_id, refs. To rewrite steps, pass a list under custom_steps_separated: [{"content": "...", "expected": "..."}, ...].

prepare_runs_diffA

Compute the regression / fix / coverage delta between two runs and return the structured data + narrate instructions for the calling Claude.

A is the baseline (older), B is the newer run. No LLM call happens server-side.

flaky_test_detectorA

Pull this case's result across the last N runs and flag flakiness.

A test is "flaky" if it has BOTH passes and failures in the window AND flips between them at least twice. Returns the run-by-run trace.

prepare_feature_bootstrapA

Prepare a feature-import workflow: fetch the spec, pull house-style anchors, and return everything the calling Claude needs to drive generation and push.

No LLM call happens server-side. Claude in the client generates cases (with the instructions and style examples this tool returns) and then calls add_test_cases_bulk to commit them.

Required:

  • source_type: "confluence" | "jira" | "text"

  • source_value: page_id / issue_key / raw text

  • either new_suite_name (creates a new suite when you push) or existing_suite_id

  • section_name — hierarchy allowed: "A > B > C"

Optional:

  • style_from_suite_id — pull style anchors from a populated suite. Recommended when you're bootstrapping a brand-new empty suite that has no cases yet.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sergey-Bl/testrail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server