Skip to main content
Glama
sbarbi-gh
by sbarbi-gh

execute_r

Executes R code for bulk RNA-seq analysis in a persistent, isolated container. Supports differential expression, pathway enrichment, and visualization using packages like DESeq2 and clusterProfiler.

Instructions

Execute R code in the isolated analysis container. The R session is PERSISTENT: objects defined in earlier calls remain available.

OUTPUT RULES (enforced server-side — follow them in your code):

  • Write to /output ONLY aggregated results: DE tables (log2FC, pvalue, padj per gene), pathway scores, group-level summary statistics, model coefficients.

  • Do NOT write per-sample matrices (normalized counts, raw counts, PCA coordinates) as CSV/TSV to /output. Keep them in R memory for intermediate computation.

  • Plots (PNG) showing sample-level data are permitted — use anonymous labels (S1, S2, ...).

  • ggsave() and png() write to /output/; use descriptive names.

  • If the server blocks a CSV file, revise your code to export an aggregated version.

Available R packages: DESeq2, edgeR, limma, ggplot2, pheatmap, ComplexHeatmap, EnhancedVolcano, ggrepel, patchwork, clusterProfiler, fgsea, msigdbr, org.Hs.eg.db, org.Mm.eg.db, AnnotationDbi. No internet access — use org.Hs.eg.db instead of biomaRt for gene annotation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description thoroughly discloses behavioral traits: persistent R session, output rules (aggregated results only, no per-sample matrices), plot restrictions (anonymous labels), server-side enforcement, and limited package availability. This fully informs the agent of important constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections, but it is somewhat lengthy. It front-loads the purpose and uses bullet points for output rules, making it scannable. A slight reduction in verbosity could improve conciseness.

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?

The description covers the persistent session, output restrictions, available packages, and connectivity limitations. Given the presence of an output schema (not shown), it does not need to explain return values. It is complete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single 'code' parameter is minimally described but its purpose is implied by 'Execute R code'. The description compensates for 0% schema coverage by explaining the execution context and constraints, though it does not explicitly define the parameter format or length.

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 clearly states 'Execute R code in the isolated analysis container.' It specifies the persistent R session, output rules, and available packages, distinguishing it from sibling tools like execute_python.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides detailed guidelines on output rules, prohibited file types, and package choices (e.g., use org.Hs.eg.db instead of biomaRt). However, it does not explicitly contrast with execute_python or state when to choose R over Python.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/sbarbi-gh/brcna'

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