Skip to main content
Glama
r-packagedev-mcp

r-packagedev-mcp

by B0ydT

use_pipe

Add the magrittr pipe (%>%) to an R package by creating utils-pipe.R and updating NAMESPACE, with an option to control exporting the operator.

Instructions

Add the magrittr pipe (%>%) to the package via usethis::use_pipe(). Creates utils-pipe.R and updates NAMESPACE.

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": "use_pipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
exportNoWhether to export the pipe operator (default true).
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.5/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. It usefully discloses side effects (creates utils-pipe.R and updates NAMESPACE), but it does not say what happens if the file already exists, whether changes are reversible, or what dependencies are added.

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

Conciseness5/5

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

Two short sentences front-load the action and then add the concrete file effects. Every sentence earns its place with no redundant wording.

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?

The tool is simple and the schema is fully documented, and the description covers purpose and main side effects. However, for a file-mutating setup tool with no annotations, it omits important behavioral details such as overwrite behavior and dependency changes, leaving some gaps.

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?

Schema description coverage is 100%, so project_path and export are already documented in the input schema. The description adds no parameter-specific meaning beyond the schema, which meets the baseline of 3.

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 gives a specific verb and resource ('Add the magrittr pipe (%>%)') and identifies the implementation via usethis::use_pipe(), so it is clearly distinct from the other use_* setup tools. It also names the concrete artifacts affected, which removes ambiguity about what the tool does.

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

Usage Guidelines2/5

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

It describes the operation but gives no explicit guidance on when to choose this tool versus manually editing files or using a related setup tool. No prerequisites, exclusions, or alternatives are stated.

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