galaxy-mcp

v1.3.0
io.github.galaxyproject/galaxy-mcp Checked 2 hours ago Published 10 months ago

MCP server for Galaxy bioinformatics platform - connect, execute tools, and manage workflows

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

connect Connect

Connect to Galaxy server

ParameterTypeDescription
api_keyGalaxy API key (optional, uses GALAXY_API_KEY env var if not provided)
urlGalaxy server URL (optional, uses GALAXY_URL env var if not provided)

search_tools_by_name Search Tools By Name

Search Galaxy tools whose name, ID, or description contains the given query (substring match). RECOMMENDED WORKFLOW: 1. Use this function to find tools by name/keyword 2. Review the returned tool IDs and names 3. Call get_tool_details(tool_id) for full input parameters 4. Call run_tool() with the correct inputs

ParameterTypeDescription
query *stringSearch query - matches against tool name, ID, or description. Examples: "fastq", "alignment", "filter", "bwa"

get_tool_details Get Tool Details

Get detailed information about a specific tool including its input parameters. RECOMMENDED WORKFLOW: 1. First find tools using search_tools_by_name() or get_tool_panel() 2. Call this function with io_details=True to see all input parameters 3. Use the inputs schema to construct the inputs dict for run_tool()

ParameterTypeDescription
tool_id *stringGalaxy tool identifier. Common formats: - Simple: "fastqc", "bwa", "upload1" - Toolshed: "toolshed.g2.bx.psu.edu/repos/devteam/fastqc/fastqc/0.73"
io_detailsbooleanSet True to include detailed input/output parameter schemas. Essential for understanding how to call run_tool().

get_tool_run_examples Get Tool Run Examples

Return the exact XML test definitions (inputs, outputs, assertions, required files) for a Galaxy tool so an LLM can study real, working run configurations.

ParameterTypeDescription
tool_id *stringID of the tool to inspect
tool_versionOptional version selector (use '*' for all versions)

get_tool_citations Get Tool Citations

Get citation information for a specific tool

ParameterTypeDescription
tool_id *stringID of the tool

run_tool Run Tool

Run a Galaxy tool on datasets in a history. RECOMMENDED WORKFLOW: 1. Create or select a history: create_history() or get_histories() 2. Upload data: upload_file() or upload_file_from_url() 3. Get tool parameters: get_tool_details(tool_id, io_details=True) 4. Call this function with properly formatted inputs 5. Monitor job: get_job_details() or check history contents

ParameterTypeDescription
history_id *stringGalaxy history ID (16-char hex string like '1cd8e2f6b131e5aa'). Get from create_history() or get_histories().
inputs *objectTool input parameters. Dataset inputs use this format: {"input_name": {"src": "hda", "id": "dataset_id"}}
tool_id *stringTool identifier. Common formats: - Simple built-in: "cat1", "Cut1", "upload1" - Toolshed: "toolshed.g2.bx.psu.edu/repos/iuc/fastqc/fastqc/0.73"

get_tool_panel Get Tool Panel

Get the tool panel structure (toolbox)

create_history Create History

Create a new history to organize datasets and analyses. A history is the primary workspace in Galaxy. Create a new history for each distinct project or analysis to keep your work organized. RECOMMENDED WORKFLOW: 1. Create a history with a descriptive name 2. Upload your input data: upload_file() or upload_file_from_url() 3. Run tools on the data: run_tool() 4. View results: get_history_contents()

ParameterTypeDescription
history_name *stringDescriptive name for the history. Best practices: - Include project/sample name: "RNA-seq Sample A" - Include date if relevant: "ChIP-seq 2024-01" - Be specific…

search_tools_by_keywords Search Tools By Keywords

Recommend Galaxy tools based on a list of keywords.

ParameterTypeDescription
keywords *arrayA list of keywords or phrases describing what you're looking for, e.g., ["csv", "rna", "alignment", "visualization"]. The search will match tools whose name, description, or accepted input formats con…

get_server_info Get Server Info

Get Galaxy server information including version, URL, and configuration details

get_user Get User

Get current user information

get_histories Get Histories

Get list of user's histories with optional pagination and filtering. Histories are Galaxy's primary organizational unit - each contains datasets, collections, and records of analyses. Most operations require a history_id. RECOMMENDED WORKFLOW: 1. Call get_histories() to see existing histories 2. Either use an existing history_id or create_history() for new work 3. Upload data or run tools in the selected history

ParameterTypeDescription
limitMaximum histories to return. Default None returns all. Use with offset for pagination on large history lists.
nameFilter by name pattern (case-sensitive partial match). Example: name="RNA" matches "RNA-seq analysis", "my RNA data"
offsetintegerSkip this many histories (for pagination). Default 0.

list_history_ids List History Ids

Get a simplified list of history IDs and names for easy reference

get_history_details Get History Details

Get history metadata and summary count ONLY - does not return actual datasets This function provides quick access to history information without loading all datasets. For the actual datasets/contents, use get_history_contents() which supports pagination and ordering.

ParameterTypeDescription
history_id *stringGalaxy history ID - a hexadecimal hash string identifying the history (e.g., '1cd8e2f6b131e5aa', typically 16 characters)

get_history_contents Get History Contents

Get paginated contents (datasets and collections) from a specific history with ordering support

ParameterTypeDescription
history_id *stringGalaxy history ID - a hexadecimal hash string identifying the history (e.g., '1cd8e2f6b131e5aa', typically 16 characters)
deletedbooleanInclude deleted datasets in results (default: False)
limitintegerMaximum number of items to return per page (default: 100, max recommended: 500)
offsetintegerNumber of items to skip from the beginning (default: 0, for pagination)
orderstringSort order for results. Options include: - 'hid-asc': History ID ascending (default, oldest first) - 'hid-dsc': History ID descending (newest first) - 'create_time-dsc': Creation time descending…
visiblebooleanInclude only visible datasets (default: True, set False to include hidden)

get_job_details Get Job Details

Get detailed information about the job that created a specific dataset

ParameterTypeDescription
dataset_id *stringGalaxy dataset ID - a hexadecimal hash string identifying the dataset (e.g., 'f2db41e1fa331b3e', typically 16 characters)
history_idGalaxy history ID containing the dataset - optional for performance optimization (e.g., '1cd8e2f6b131e5aa', typically 16 characters)

get_dataset_details Get Dataset Details

Get detailed information about a specific dataset, optionally including a content preview

ParameterTypeDescription
dataset_id *stringGalaxy dataset ID - a hexadecimal hash string identifying the dataset (e.g., 'f2db41e1fa331b3e', typically 16 characters)
include_previewbooleanWhether to include a preview of the dataset content showing first N lines (default: True, only works for datasets in 'ok' state)
preview_linesintegerNumber of lines to include in the content preview (default: 10)

get_collection_details Get Collection Details

Get detailed information about a dataset collection and its members Dataset collections group multiple datasets together (e.g., paired-end reads, sample lists). This tool shows the collection structure and member datasets.

ParameterTypeDescription
collection_id *stringGalaxy dataset collection ID - a hexadecimal hash string (e.g., 'a1b2c3d4e5f6g7h8', typically 16 characters)
max_elementsintegerMaximum number of collection elements to return (default: 100) Set lower for large collections to avoid overwhelming output

download_dataset Download Dataset

Download a dataset from Galaxy to the local filesystem or memory

ParameterTypeDescription
dataset_id *stringGalaxy dataset ID - a hexadecimal hash string identifying the dataset (e.g., 'f2db41e1fa331b3e', typically 16 characters)
file_pathLocal filesystem path where to save the downloaded file (e.g., '/path/to/data.txt', requires write access to filesystem) If not provided, downloads to memory instead
require_ok_statebooleanOnly allow download if dataset processing state is 'ok' (default: True, set False to download datasets in other states)
use_default_filenamebooleanDeprecated - use file_path for specific locations (default: True, ignored when file_path not provided)

upload_file Upload File

Upload a local file to Galaxy for analysis. Galaxy automatically detects the file type (FASTQ, BAM, BED, etc.) and indexes the file appropriately. Large files are uploaded efficiently. RECOMMENDED WORKFLOW: 1. Create a history: create_history("My Analysis") 2. Upload your data files with this function 3. Wait for upload to complete (check dataset state) 4. Run tools on the uploaded data: run_tool()

ParameterTypeDescription
path *stringLocal file path to upload. Supports common bioinformatics formats: - Sequences: .fastq, .fasta, .fa, .fq, .fastq.gz - Alignments: .bam, .sam, .cram - Annotations: .bed, .gff, .gtf, .vcf - Tabu…
history_idTarget history ID. If None, uses the most recent history. Recommend always specifying for clarity.

upload_file_from_url Upload File From Url

Upload a file from a URL to Galaxy

ParameterTypeDescription
url *stringURL of the file to upload (e.g., 'https://example.com/data.fasta')
dbkeystringDatabase key/genome build (default: '?', e.g., 'hg38', 'mm10', 'dm6')
file_nameOptional name for the uploaded file in Galaxy (inferred from URL if not provided)
file_typestringGalaxy file format name (default: 'auto' for auto-detection) Common types: 'fasta', 'fastq', 'bam', 'vcf', 'bed', 'tabular', etc.
history_idGalaxy history ID where to upload the file - optional, uses current history (e.g., '1cd8e2f6b131e5aa', typically 16 characters)

get_invocations Get Invocations

View workflow invocations in Galaxy

ParameterTypeDescription
history_idFilter invocations by history ID - a hexadecimal hash string (e.g., '1cd8e2f6b131e5aa', typically 16 characters, optional)
invocation_idSpecific workflow invocation ID to view - a hexadecimal hash string (e.g., 'a1b2c3d4e5f6789a', typically 16 characters, optional)
limitMaximum number of invocations to return (optional, default: no limit)
step_detailsbooleanInclude details on individual workflow steps (only applies when view is 'element', default: False)
viewstringLevel of detail to return - 'element' for detailed or 'collection' for summary (default: 'collection')
workflow_idFilter invocations by workflow ID - a hexadecimal hash string (e.g., 'b2c3d4e5f6789abc', typically 16 characters, optional)

get_iwc_workflows Get Iwc Workflows

Fetch all workflows from the IWC (Interactive Workflow Composer)

search_iwc_workflows Search Iwc Workflows

Search for workflows in the IWC (Intergalactic Workflow Commission) manifest. IWC hosts curated, best-practice workflows for common bioinformatics analyses. This function searches across workflow names, descriptions, tags, and readmes. RECOMMENDED WORKFLOW: 1. Search for workflows matching your analysis need 2. Review the results - check step_count for complexity, readme_summary for details 3. Call get_iwc_workflow_details(trs_id) for full information 4. Import with import_workflow_from_iwc(trs_id) 5. Run with invoke_workflow()

ParameterTypeDescription
query *stringSearch query (case-insensitive). Matches against: - Workflow name (e.g., "RNA-seq") - Description/annotation - Tags (e.g., "assembly", "transcriptomics")

get_iwc_workflow_details Get Iwc Workflow Details

Get comprehensive details about a specific IWC workflow before importing. Use this to examine a workflow's full documentation, inputs, and complexity before deciding to import it into your Galaxy instance. RECOMMENDED WORKFLOW: 1. Search workflows with search_iwc_workflows() or recommend_iwc_workflows() 2. Call this function with the trsID to get full details 3. Review the readme and inputs to ensure it fits your needs 4. Import with import_workflow_from_iwc(trs_id)

ParameterTypeDescription
trs_id *stringThe TRS (Tool Registry Service) ID from search results. Format: "#workflow/github.com/iwc-workflows/<name>/<branch>" Example: "#workflow/github.com/iwc-workflows/rnaseq-pe/main"

recommend_iwc_workflows Recommend Iwc Workflows

Semantic search for IWC workflows based on natural language description. Use this when you have a general analysis goal and want to find the best matching workflows. Uses BM25 ranking to search across names, descriptions, readmes, tags, and tool names. RECOMMENDED WORKFLOW: 1. Describe your analysis goal in natural language 2. Review ranked recommendations with match explanations 3. Get details for promising workflows: get_iwc_workflow_details(trs_id) 4. Import the best match: import_workflow_from_iwc(trs_id)

ParameterTypeDescription
intent *stringNatural language description of your analysis goal. Examples: - "I have paired-end RNA-seq data and want differential expression" - "Assemble a bacterial genome from nanopore reads" -…
limitintegerMaximum number of recommendations to return (default: 5)

import_workflow_from_iwc Import Workflow From Iwc

Import a workflow from IWC to the user's Galaxy instance

ParameterTypeDescription
trs_id *stringTRS ID of the workflow in the IWC manifest

list_workflows List Workflows

List workflows available in the Galaxy instance

ParameterTypeDescription
nameFilter workflows by name (optional)
publishedbooleanInclude published workflows (default: False, shows only user workflows)
workflow_idSpecific workflow ID to get (optional) - a hexadecimal hash string

get_workflow_details Get Workflow Details

Get detailed information about a specific workflow

ParameterTypeDescription
workflow_id *stringID of the workflow to get details for - a hexadecimal hash string
versionSpecific version of the workflow (optional, uses latest if not specified)

invoke_workflow Invoke Workflow

Invoke (run) a workflow with specified inputs and parameters

ParameterTypeDescription
workflow_id *stringID of the workflow to invoke - a hexadecimal hash string
history_idID of history to store workflow outputs (optional)
history_nameName for new history to create (ignored if history_id provided)
inputsMapping of workflow inputs to datasets. Format: {'step_index': {'id': 'dataset_id', 'src': 'hda'}} where src can be: - 'hda' for HistoryDatasetAssociation - 'hdca' for HistoryDatasetCollectio…
inputs_bystringHow to identify workflow inputs - 'step_index', 'step_uuid', or 'name'
parameters_normalizedbooleanWhether parameters are already in normalized format
paramsTool parameter overrides as a nested dictionary

cancel_workflow_invocation Cancel Workflow Invocation

Cancel a running workflow invocation

ParameterTypeDescription
invocation_id *stringID of the workflow invocation to cancel - a hexadecimal hash string