rf-mcp

v0.36.0
rf-mcp Checked 5 days ago Published 2 months ago

Robot Framework MCP Server - Natural Language Test Automation Bridge

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

manage_library_plugins Manage Library Plugins

Inspect or reload library plugins.

ParameterTypeDescription
actionstringOne of "list", "reload", or "diagnose".
plugin_namePlugin name when action="diagnose".

recommend_libraries Recommend Libraries

Recommend libraries for a scenario or generate/merge sampling prompts. WHEN TO USE THIS TOOL: - IMMEDIATELY after analyze_scenario, before execute_step - When you encounter "No keyword with name" errors - To discover which libraries provide needed functionality This tool analyzes scenario text and suggests relevant libraries, saving you from guessing which libraries to import.

ParameterTypeDescription
scenario *stringNatural-language description of the task to automate.
apply_search_orderbooleanWhen True, applies recommended order to the session.
available_librariesOptional pre-fetched library metadata to use instead of registry defaults.
check_availabilitybooleanWhen True, checks installability/presence of suggested libs.
contextstringContext such as "web", "mobile", or "api". Defaults to "web".
include_keywordsbooleanWhen True, include a compact keyword list (names only) for the top recommendation.
kNumber of samples to request when mode="sampling_prompt" (defaults to 4).
max_recommendationsintegerMaximum libraries to return (direct mode).
modestring"direct", "sampling_prompt", or "merge_samples".
samplesSampled recommendations to merge when mode="merge_samples".
session_idOptional session id to align recommendations with an existing session.
use_llm_refinementbooleanWhen True, uses LLM via ctx.sample() to refine recommendations.

analyze_scenario Analyze Scenario

Analyze a natural-language scenario into structured intent and create a session. WORKFLOW: This is the single front door — your FIRST tool call for any test scenario. It CREATES the session, so do NOT also call manage_session(action="init") for the same scenario (that causes redundant session churn). Reuse the returned session_id in every later call. What this tool does: 1. Creates a new session with unique session_id (or reuses provided one) 2. Analyzes scenario to detect context (web/api/mobile/desktop) 3. Auto-configures libraries based on scenario text 4. Returns session_id for use in…

ParameterTypeDescription
scenario *stringHuman-language description of the task to automate.
contextstringApplication context (e.g., "web", "mobile", "api", "desktop"); defaults to "web". An explicit context="desktop" DETERMINISTICALLY forces a native desktop (PlatynUI) session regardless of scenario word…
session_idstringOptional existing session id to reuse; if omitted, a new one is created.

find_keywords Find Keywords

Discover Robot Framework keywords using multiple strategies. WHEN TO USE THIS TOOL: - ALWAYS before calling execute_step with an unfamiliar keyword - When you're unsure of exact keyword name or spelling - To discover what keywords are available in imported libraries - When error says "No keyword with name 'X' found"

ParameterTypeDescription
query *stringSearch text or intent description. Examples: "click a button", "validate json", "get*request"
contextstringScenario context (e.g., "web", "mobile", "api") used by semantic discovery.
current_stateOptional state payload to improve semantic matching.
library_nameOptional library filter applied to ALL strategies. When set, restricts results to the named library and its compatible siblings (e.g., library_name="Browser" excludes Sel…
limitOptional maximum number of results to return.
session_idRequired for strategy="session" to search the live RF namespace.
strategystringDiscovery approach: - "semantic": Hybrid keyword search combining name/doc pattern matching, tag/action-class classification, and (when installed) sentence-transformers embedding…
strict_librarybooleanOBS-33 — when True AND a library preference is set (via ``library_name`` or session ``explicit_library_preference``), exclude EVERY library that isn't the preferr…

manage_session Manage Session

Manage session lifecycle: initialize, configure libraries/variables, and organize tests. For a NEW scenario, prefer analyze_scenario — it is the front door that CREATES the session (and auto-configures libraries). Use manage_session for explicit session ops on an existing session (importing extra libraries/resources/variables, multi-test structure). Do NOT call action="init" right after analyze_scenario — the session already exists; that only causes redundant churn.

ParameterTypeDescription
action *string
alias
args
keyword
libraries
library_name
model_name
model_tier
profile
resource_path
scenario
scopestring
session_idstring
template
test_documentationstring
test_messagestring
test_name
test_setup
test_statusstring
test_tags
test_teardown
tool_profile
variable_file_path
variables

execute_flow Execute Flow

Execute structured flow (if/for/try) within a session.

ParameterTypeDescription
session_id *stringSession id to run the flow in.
structure *stringFlow type ("if", "for", "try").
conditionExpression for if/conditional flows.
else_stepsSteps for the else branch (if).
except_patternsError patterns to match for except handling.
except_stepsSteps for the except block.
finally_stepsSteps for the finally block.
item_varstringVariable name to bind each item in for-each loops.
itemsItems to iterate when structure="for".
max_iterationsintegerMaximum iterations for for-each loops.
rethrowbooleanWhether to rethrow after except/finally.
stop_on_failurebooleanWhether to stop loop/branch execution on first failure.
then_stepsSteps for the main branch (if/loop body/try block).
try_stepsSteps for the try block (when structure="try").

get_session_state Get Session State

Retrieve aggregated session state for debugging and visibility.

ParameterTypeDescription
session_id *stringActive session identifier to inspect.
dom_chunk_sizeintegerMaximum size of each DOM chunk when streaming is enabled (minimum 1024 bytes).
elements_of_interestTargeted element identifiers passed to application state collectors.
include_dom_streambooleanChunk large page_source payloads into page_source_stream entries for easier transport.
include_reduced_dombooleanWhether to include lightweight semantic DOM (ARIA snapshots) for quick inspection.
modestring
page_source_filteredbooleanWhen True, returns sanitized/filtered DOM text instead of the full source.
page_source_filtering_levelstringFiltering aggressiveness for DOM output (standard|aggressive).
sectionsSpecific data blocks to include (e.g., summary, page_source, variables, application_state, ui_tree). ui_tree (desktop/PlatynUI sessions only): accessibility-tree snapshot. Lists applications; pass app…
since_version
state_typestringType of application state to fetch when requesting application_state (dom|api|database|all).

execute_step Execute Step

Execute a single Robot Framework keyword (or Evaluate) within a session.

ParameterTypeDescription
keyword *stringKeyword name (Library.Keyword supported). Use find_keywords to discover correct keyword names before calling.
argumentsarrayKeyword arguments; positional and named (`name=value`) supported.
assign_toVariable name(s) to assign the result to (string or list). CRITICAL: Use this to capture results for later steps. Example: assign_to="response" captures ${response} variable
bdd_groupstringOptional group name for BDD keyword generation. Steps with the same bdd_group are clustered into a single behavioral keyword when build_test_suite(bdd_style=True) is called. Examp…
bdd_intentstringBDD intent prefix for the group: "given", "when", "then", "and", "but". Used with bdd_group to assign Given/When/Then prefixes in the generated BDD test suite.
detail_levelstringResponse verbosity: "minimal" | "standard" | "full".
expressionExpression for mode="evaluate"; falls back to keyword/first argument.
modestring"keyword" (default) or "evaluate" (runs BuiltIn.Evaluate).
pre_validate_timeout_msOverride the pre-validation gate's timeout for this single call. Pre-validation is the fast ~500ms-default check that verifies an element is visible / enabled before the keyword runs; it a…
raise_on_failurebooleanIf True, raise on failure; otherwise return error in payload.
recordOverride the record gate that decides whether a successful step is appended to session.steps for build_test_suite output. - None (default): auto-classify. Read-only inspection keywords (…
scenario_hintstringOptional scenario text to auto-configure libraries on first call.
session_idstringSession to execute in; resolves default if omitted.
timeout_msOptional timeout in milliseconds for keyword execution. If not provided, uses smart defaults based on keyword type: - Element actions (Click, Fill): 5000ms - Navigation (Go To,…
use_contextWhether to run inside RF native context; defaults via config/attach.

build_test_suite Build Test Suite

Generate a Robot Framework test suite from previously executed steps.

ParameterTypeDescription
test_name *stringName for the generated test case.
bdd_stylebooleanGenerate BDD-style suite with a Keywords section. When True, steps are grouped into behavioral keywords (Given/When/Then) and a ``*** Keywords ***`` section is appended to the generated .robot content…
data_driven_modestringHow to render data-driven (template) test cases. "auto" (default) — auto-detect: named rows → suite_template, else per_test. "per_test" — [Template] per test case with data rows (current behavio…
documentationstringOptional test case documentation.
include_pre_startbooleanWhether to adopt exploratory steps executed BEFORE start_test into the generated test body. Default False excludes them (the response reports ``excluded_pre_start_count`` + a summary) so the suite ref…
output_pathstringOptional absolute path to persist the generated .robot suite to disk directly (UTF-8; parent directories created). ALWAYS use this to save a suite — do NOT write ``rf_text`` via the ``Create File``…
remove_library_prefixesbooleanWhether to strip library prefixes from keywords.
session_idstringSession containing executed steps; auto-resolves if empty/invalid.
tagsOptional test tags.

check_library_availability Check Library Availability

Verify that specified Robot Framework libraries can be imported/installed. Recommended as step 3 after analyze_scenario and recommend_libraries; use the recommended names to avoid unnecessary checks.

ParameterTypeDescription
libraries *arrayLibrary names to verify (preferably from recommend_libraries output).

execute_batch Execute Batch

Execute multiple RF keywords in one call with recovery and variable chaining. Reduces N MCP round-trips to 1. Steps run sequentially; each step's return value is available to later steps via ${STEP_N} references in arguments. Both 0-based (${STEP_0} = first step) and 1-based (${STEP_1} = first step) indexing are accepted. When ambiguous, 1-based is preferred.

ParameterTypeDescription
session_id *stringSession to execute within (must exist or be auto-created).
steps *arrayList of step dicts, each with: - keyword (str, required): RF keyword name - arguments (list[str], optional): Positional arguments, may contain ${STEP_N} (both 0-based and 1-based indexing supported)…
max_recovery_attemptsintegerMax recovery retries per failed step (1-10, default 2).
on_failurestringPolicy on step failure: - "stop": abort immediately - "retry": retry without recovery logic - "recover" (default): attempt tiered recovery before giving up On DESKTOP (PlatynUI) sessions, retries are…
timeout_msintegerTotal batch time budget in milliseconds (1000-600000, default 120000).

resume_batch Resume Batch

Resume a failed batch from its failure point, optionally inserting fix steps. After execute_batch returns status=FAIL with a batch_id, call this to: 1. Re-run the failed step (with optional fix_steps injected before it) 2. Continue executing remaining steps from the original batch

ParameterTypeDescription
batch_id *stringThe batch_id from a failed execute_batch response.
fix_stepsOptional steps to execute before retrying the failed step. Same format as execute_batch steps.
timeout_msOverride remaining timeout budget (uses original if omitted).

get_keyword_info Get Keyword Info

Get keyword/library docs or parse a signature. Call this before execute_step when you know the keyword name but not its arguments. Modes: "keyword" (default — document one keyword), "library" (list a library's keywords), "session" (resolve against the live session namespace), "parse" (parse a signature string). Pass session_id to scope the lookup to that session's libraries.

ParameterTypeDescription
argumentsOptional arguments to parse when mode="parse".
keyword_nameKeyword to document (required for modes "keyword"/"session"/"parse").
library_nameLibrary to document (required for mode "library"; optional for keyword mode — explicit per-call scope that takes precedence over session-derived scope).
modestringOne of "keyword" (default), "library", "session", or "parse".
session_idOptional session id. - mode="keyword" / "global" (OBS-19): when provided without ``library_name``, restricts the keyword lookup to libraries imported in that session…

set_library_search_order Set Library Search Order

Set explicit library search order for keyword resolution.

ParameterTypeDescription
libraries *arrayLibrary names in priority order (highest first).
session_idstringSession to apply the search order to.

get_locator_guidance Get Locator Guidance

Provide locator/selector guidance for Browser, SeleniumLibrary, AppiumLibrary, PlatynUI.BareMetal, or RequestsLibrary. For API testing, call with library="requests" (or "api") to get a RequestsLibrary request/response cookbook — session setup, response-field access (${resp.json()["field"]}), the $resp-in-Evaluate rule, Status Should Be, JSON body/headers, the Cookie token header, and expected_status= for non-2xx — BEFORE writing Evaluate-based assertions. For VISUAL validation, call with library="visual" (or "screenshot") to learn WHEN a screenshot beats the DOM/ARIA tree (canvas/image t…

ParameterTypeDescription
error_messageOptional error text to tailor guidance (e.g., from a failed keyword).
keyword_nameOptional keyword name for context-specific hints.
librarystringTarget library ("Browser", "SeleniumLibrary", "AppiumLibrary", "PlatynUI.BareMetal", or "RequestsLibrary"/"api"). Case-insensitive.

visual_check Visual Check

Capture a screenshot of the current UI for VISUAL validation (change: visual-inspection-guidance). Token-cheap by DEFAULT: saves the screenshot to disk and returns the PATH as text — a multimodal agent WITH file access reads that file on demand for checks the DOM/ARIA can't do (canvas/image text, layout/overlap, obscured elements, color, charts). Call get_locator_guidance(library="visual") for when to use it. Set return_image=true ONLY if your model is multimodal AND cannot read the saved file (e.g. a hosted/remote MCP): the response then includes an image content block. This requires ROBO…

ParameterTypeDescription
session_id *string
filename
return_imageboolean

run_test_suite Run Test Suite

Validate or execute a Robot Framework suite.

ParameterTypeDescription
capture_screenshotsbooleanEnable screenshot capture on failures (if supported).
execution_optionsobjectRF execution options (variables, tags, loglevel, etc.). For ``suite_file_path`` with dry/validate mode, these are forwarded to Robot (e.g. ``variables``, ``include_tags``, ``exclude_tags``, ``test`` /…
include_warningsbooleanWhether to include warnings in validation output.
modestring"dry"/"validate" for dry run; "full" to execute. Defaults to "full".
output_levelstringResponse verbosity ("minimal", "standard", "detailed").
session_idstringSession containing steps to build/execute; optional if suite_file_path is given.
suite_file_pathstringPath to an existing .robot file to validate/execute.
validation_levelstringDry-run validation depth ("minimal", "standard", "strict"). Default "standard".

manage_attach Manage Attach

Inspect or control attach bridge configuration.

ParameterTypeDescription
actionstringOne of: - "status" (default): Check bridge configuration and health - "stop": Send stop command to bridge (sets stop flag) - "cleanup"/"clean": Clean expired sessions and check bridge health - "reset"…

intent_action Intent Action

Execute a high-level intent that auto-resolves to the correct library keyword. Valid intents: navigate, click, fill, hover, select, assert_visible, extract, wait_for. Also accepted but DEPRECATED: - extract_text — equivalent to ``extract`` with ``mode="text"``. The ``extract`` verb is the canonical mode-aware getter (text / attribute / count / value / url / title) and additionally surfaces ``extracted_value`` at the top level of the response. ``extract_text`` will be removed in a future release; prefer ``intent="extract"`` for new code. The intent is resolved based on the sessio…

ParameterTypeDescription
intent *stringAction verb (e.g. "click", "navigate", "fill", "extract")
assign_toVariable name to capture result (esp. useful for extract: the extracted text/count/attribute is assigned to this var).
attribute_nameRequired when ``intent="extract"`` and ``mode="attribute"``; the HTML attribute name to read (e.g. ``"href"``, ``"data-testid"``, ``"value"``). Ignored for other modes.
commitbooleanUse when: the page uses Vue, React, Angular reactive forms, jQuery validate, idealForms, formvalidation.io, or any framework that gates validation on the DOM ``change`` event. Symptom: a form submit i…
detail_levelstringResponse detail level
forcebooleanUse when: the element is visible but Playwright reports it "blocked by another element" — overlay, sticky header, cookie-consent banner, modal backdrop, animation still running. Symptom: ``Click int…
matchstringSelect-match strategy for the ``select`` intent. ``"label"`` (default) - match by visible option text. Mirrors RF semantics for ``Select Options By label``. ``"value"`` - match by ``<option value=…
modestringFor ``intent="extract"`` only. Selects what to read from the page; ignored for other intents. "text" — element text content (default) "attribute" — element attribute value (requires…
nthZero-based nth-match index. Disambiguates when multiple elements match the same locator (e.g., an id duplicated across mobile vs desktop nav). Browser library appends ``>> nth=<n>``; SeleniumLibrary a…
optionsAdditional options (e.g. {"timeout": "10s"})
session_idSession to execute against. Pass the session_id returned by analyze_scenario or manage_session(action="init") — the session that has your libraries loaded. If omitted, it is inferred ONLY when exact…
targetLocator or URL (e.g. "#submit", "text=Login", "https://example.com"). REQUIRED for navigate/click/fill/hover/select/assert_visible/wait_for. Only optional for extract with mode="url" or mode="title".…
valueValue for fill/select intents