Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

test

Runs an R package’s unit suite or a filtered subset using devtools, then reports results in a selected format.

Instructions

Run the package's test suite (or a filtered subset) using devtools::test(). Reports test results in the chosen format.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>"
    },
    "name": "test"
  }
}

Input Schema

NameRequiredDescriptionDefault
filterNoRegex pattern to restrict which test files are run (e.g. 'my_func').
reporterNotestthat reporter to use (e.g. 'progress', 'summary'). Defaults to 'progress'.
project_pathYesAbsolute path to the root of the R package.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. Naming devtools::test() and stating that results are reported in the chosen format does disclose the execution mechanism and output channel, but it omits side effects such as loading the package, executing arbitrary test code, and whether the suite must be installed first.

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?

Two short sentences, front-loaded with the action. The second sentence ('Reports test results in the chosen format') is slightly redundant with the reporter parameter but does signal the output behavior, so it still earns partial place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should carry more: it says results are reported 'in the chosen format' but does not indicate the return value's shape or that results are an object of test results. Adequate but thin 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.

Parameters5/5

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

Schema coverage is 100% and each parameter is described in the schema. The description reinforces the two optional parameters by reference ('filtered subset' for filter, 'chosen format' for reporter) while the schema supplies the regex syntax and reporter examples, so meaning is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run the package's test suite') and adds scope detail ('or a filtered subset') plus the underlying mechanism (devtools::test()). It is clear what the tool does, but it never explicitly contrasts itself with the test_dir/test_file siblings that also run tests.

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

Usage Guidelines3/5

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

The parenthetical 'or a filtered subset' implies when the filter parameter is appropriate, but there is no explicit when-to-use/when-not guidance and no named alternative for running a single file or directory. Usage is inferable rather than stated.

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