⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dependencies
node_modules/

# Production
build/
.docusaurus/

# Generated files
.cache/
.DS_Store

# Misc
.env.local
.env
45 changes: 45 additions & 0 deletions apps/docs/.roomodes
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
customModes:
- slug: release-notes-writer
name: 📝 Release Notes Writer
roleDefinition: "You are a technical writer for Roo Code release notes. Your job is to: - Automate release note creation. - Fetch and analyze GitHub pull requests. - Convert technical changes into user benefits. - Ensure updates align with documentation standards. - Update all required documentation files in the docs/update-notes directory."
whenToUse: |-
Use this mode to create or update release notes from GitHub PRs and existing docs.
Triggers: "Create release notes for X.Y.Z", "vX.Y.Z", bare version (e.g., "3.25.1"), "latest",
"Discord release notes for X.Y.Z", "Combined Discord announcement for X.Y.Z, X.Y.Z".
It automates PR fetching/analysis, changelog alignment, file generation (vX.Y or vX.Y.Z),
index/sidebar updates, and Discord formatting with approval gates.
description: Release notes files and sidebar configuration
groups:
- read
- command
- - edit
- fileRegex: (docs/update-notes/.*\.(md|mdx)$|sidebars\.ts$|\.roo/tmp/release-notes/.*\.(md|json)$)
source: project
- slug: documentation-writer
name: 📖 Documentation Writer
roleDefinition: |-
You are Roo Code, a documentation specialist who writes only what matters.
Core behaviors:
- Explanatory first: tell users why, why not, and how to recover (troubleshooting).
- Minimal ToC noise: H2 for primary sections; H3 only for jump-worthy anchors (max 4 per page, typically <= 2); prefer H4 for in-body sub-chunking; disallow H5/H6.
- Merge thin subsections and convert step chains into numbered lists under their H2.
- Bold, honest, human voice with contractions; informal and clear, not professoral.
- Selective screenshots: only for complex states/decisions; require outcome-focused alt text and a one-line "why this matters" caption.
- Prefer consolidation over duplication; link to the single source of truth.
- Enforce .roo/rules-documentation-writer/ policies (writing style, headings/structure, Docusaurus conventions, validation gates).
whenToUse: |-
Use this mode to create or refine technical docs (.md/.mdx) with an explanatory, value-first approach and a clean, minimal ToC.
Triggers:
- Pages with noisy right-sidebar ToCs or overuse of H3s
- Requests to restructure into H2 sections with H4 sub-chunks and numbered lists
- Need to add "Why it matters / What you can't do (and why) / Troubleshooting"
- Requests to add or prune screenshots for complex states/decisions
description: Creates and maintains Roo technical docs.
groups:
- read
- command
- - edit
- fileRegex: (\.(md|mdx)$|sidebars\.ts$|docusaurus\.config\.ts$)
description: Documentation files and sidebar configuration
- mcp
source: project
21 changes: 21 additions & 0 deletions apps/docs/.roorules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Roo Code Documentation Rules

## Documentation Links
- Do not include .md extensions in documentation links
- Use absolute paths starting from the `/docs/` root for internal documentation links
- Example: [link text](/basic-usage/how-tools-work) NOT [link text](basic-usage/how-tools-work.md) or [link text](../../basic-usage/how-tools-work)

This ensures links work correctly in the built documentation while maintaining clean URLs.

## Context7 MCP
When making structural or formatting changes beyond simple .md or .mdx files, always check the Context7 MCP, the `context7CompatibleLibraryID` will be `/facebook/docusaurus`

## Release Notes "thank you" exclusions
Do not thank daniel-lxs, cte, hannesrudolph, jr, roomote, app/roomote, dleffel, brunobergher or mrubens in release notes


## Misc
When moving a section, make sure to add the forwarding link in docusaurus.config.ts

## Image Tag Format
example: `<img src="<PATH>" alt="<ALT>" width="<WIDTH>" />`
19 changes: 19 additions & 0 deletions apps/docs/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AGENTS.md

This file provides guidance to agents when working with code in this repository.

Non-obvious, project-specific rules:

- Start/build preload dotenv; analytics plugin is enabled only when POSTHOG_API_KEY is set. Use .env based on [.env.example](.env.example). CI injects it in [.github/workflows/docusaurus-build.yml](.github/workflows/docusaurus-build.yml). See [package.json](package.json) and [docusaurus.config.ts](docusaurus.config.ts).
- Use Node 20 locally to match CI; engines allow >=18 but CI runs 20.
- Linting targets only /src; docs content is not linted. Use "pnpm run lint:unused" to enforce unused import removal. Type checking uses "tsc" only (no emit); [tsconfig.json](tsconfig.json) is editor-focused.
- When moving/renaming docs, you must add an explicit redirect in [docusaurus.config.ts](docusaurus.config.ts) under plugin-client-redirects. This is required by [.roorules](.roorules).
- Internal doc links must be absolute and extensionless per [.roorules](.roorules) (example: /basic-usage/how-tools-work). Do not include ".md".
- Images in docs must use HTML tags per [.roorules](.roorules): <img src="/img/...png" alt="..." width="600" />.
- Sitemap: preset sitemap is disabled; a custom plugin is configured in [docusaurus.config.ts](docusaurus.config.ts) to filter URLs containing "/page/". Do not re-enable the preset sitemap.
- Local search plugin is configured with docsRouteBasePath "/". Keep routeBasePath "/" consistent when adding content or links.
- "Tutorial Videos" sidebar is generated from [docs/tutorial-videos.json](docs/tutorial-videos.json); titles are truncated to 40 chars in [sidebars.ts](sidebars.ts). Modify the JSON to add/remove videos.
- Navigation/footer links are centralized in [src/constants.ts](src/constants.ts) and consumed by [docusaurus.config.ts](docusaurus.config.ts). Update constants rather than hardcoding URLs.
- Legacy [Rakefile](Rakefile) is unrelated (Jekyll). Do not use it; all builds run through Docusaurus scripts.
- For structural/formatting research, use Context7 MCP (ID "/facebook/docusaurus") via [.roo/mcp.json](.roo/mcp.json); see [.roorules](.roorules).
- CI runs build and check-types (no lint). Run lint locally to catch issues CI won't.
92 changes: 92 additions & 0 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Roo Code Documentation

This directory contains the official documentation site for Roo Code, built with [Docusaurus](https://docusaurus.io/).

## Development

```bash
# From the monorepo root
pnpm install

# Start the development server
pnpm --filter @roo-code/docs start

# Build the site
pnpm --filter @roo-code/docs build

# Serve the built site locally
pnpm --filter @roo-code/docs serve
```

## Environment Variables

Create a `.env` file based on `.env.example`:

- `POSTHOG_API_KEY`: Analytics key for PostHog (optional)
- `INTERCOM_APP_ID`: Intercom widget ID (optional)

## Vercel Deployment Setup

The docs are deployed to Vercel automatically on push to `main`. To set up:

### Required Secrets

Add these secrets to the GitHub repository settings:

1. **VERCEL_TOKEN**: Personal Access Token from Vercel

- Go to Vercel → Settings → Tokens
- Create a new token with appropriate permissions

2. **VERCEL_ORG_ID**: Organization ID from Vercel

- Run `vercel link` in the docs directory
- Find the ID in `.vercel/project.json`

3. **VERCEL_DOCS_PROJECT_ID**: Project ID for the docs

- Same as above, from `.vercel/project.json`

4. **POSTHOG_API_KEY**: PostHog analytics key (optional)

5. **INTERCOM_APP_ID**: Intercom widget ID (optional)

### Vercel Project Configuration

In the Vercel project settings:

- **Root Directory**: `apps/docs`
- **Build Command**: `pnpm build`
- **Output Directory**: `build`
- **Install Command**: `pnpm install --frozen-lockfile`
- **Framework Preset**: Other
- **Node Version**: 20.x

### Custom Domain

Configure the custom domain `docs.roocode.com` in Vercel project settings.

## Structure

- `docs/`: Markdown documentation files
- `src/`: Custom React components and theme overrides
- `static/`: Static assets (images, etc.)
- `docusaurus.config.ts`: Main configuration file
- `sidebars.ts`: Sidebar navigation structure

## Writing Documentation

- Use absolute, extensionless paths for internal links: `/basic-usage/how-tools-work`
- Use HTML `<img>` tags for images: `<img src="/img/example.png" alt="Description" width="600" />`
- Add redirects in `docusaurus.config.ts` when moving/renaming pages

## Migration Notes

This documentation was migrated from the standalone `Roo-Code-Docs` repository into the monorepo as `apps/docs`.

Key changes:

- Package name changed to `@roo-code/docs`
- `@roo-code/types` dependency uses `workspace:^` protocol
- Edit URLs now point to `apps/docs/` path in the Roo-Code repository
- Deployment moved from standalone repo to monorepo workflows
164 changes: 164 additions & 0 deletions apps/docs/docs/advanced-usage/available-tools/access-mcp-resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
description: Learn how the access_mcp_resource tool retrieves data from Model Context Protocol servers for additional context in Roo Code tasks.
keywords:
- access_mcp_resource
- MCP
- Model Context Protocol
- MCP resources
- Roo Code tools
- context retrieval
- API integration
---

# access_mcp_resource

The `access_mcp_resource` tool retrieves data from resources exposed by connected Model Context Protocol (MCP) servers. It allows Roo to access files, API responses, documentation, or system information that provides additional context for tasks.

---

## Parameters

The tool accepts these parameters:

- `server_name` (required): The name of the MCP server providing the resource
- `uri` (required): The URI identifying the specific resource to access

---

## What It Does

This tool connects to MCP servers and fetches data from their exposed resources. Unlike `use_mcp_tool` which executes actions, this tool specifically retrieves information that serves as context for tasks.

---

## When is it used?

- When Roo needs additional context from external systems
- When Roo needs to access domain-specific data from specialized MCP servers
- When Roo needs to retrieve reference documentation hosted by MCP servers
- When Roo needs to integrate real-time data from external APIs via MCP

---

## Key Features

- Retrieves both text and image data from MCP resources
- Requires user approval before executing resource access
- Uses URI-based addressing to precisely identify resources
- Integrates with the Model Context Protocol SDK
- Displays resource content appropriately based on content type
- Supports timeouts for reliable network operations
- Handles server connection states (connected, connecting, disconnected)
- Discovers available resources from connected servers
- Processes structured response data with metadata
- Handles image content special rendering

---

## Limitations

- Depends on external MCP servers being available and connected
- Limited to the resources provided by connected servers
- Cannot access resources from disabled servers
- Network issues can affect reliability and performance
- Resource access subject to configured timeouts
- URI formats are determined by the specific MCP server implementation
- No offline or cached resource access capabilities

---

## How It Works

When the `access_mcp_resource` tool is invoked, it follows this process:

1. **Connection Validation**:

- Verifies that an MCP hub is available and initialized
- Confirms the specified server exists in the connection list
- Checks if the server is disabled (returns an error if it is)

2. **User Approval**:

- Presents the resource access request to the user for approval
- Provides server name and resource URI for user verification
- Proceeds only if the user approves the resource access

3. **Resource Request**:

- Uses the Model Context Protocol SDK to communicate with servers
- Makes a `resources/read` request to the server through the MCP hub
- Applies configured timeouts to prevent hanging on unresponsive servers

4. **Response Processing**:
- Receives a structured response with metadata and content arrays
- Processes text content for display to the user
- Handles image data specially for appropriate display
- Returns the processed resource data to Roo for use in the current task

---

## Resource Types

MCP servers can provide two main types of resources:

1. **Standard Resources**:

- Fixed resources with specific URIs
- Defined name, description, and MIME type
- Direct access without parameters
- Typically represent static data or real-time information

2. **Resource Templates**:
- Parameterized resources with placeholder values in URIs
- Allow dynamic resource generation based on provided parameters
- Can represent queries or filtered views of data
- More flexible but require additional URI formatting

---

## Examples When Used

- When helping with API development, Roo retrieves endpoint specifications from MCP resources to ensure correct implementation.
- When assisting with data visualization, Roo accesses current data samples from connected MCP servers.
- When working in specialized domains, Roo retrieves technical documentation to provide accurate guidance.
- When generating industry-specific code, Roo references compliance requirements from documentation resources.

---

## Usage Examples

Accessing current weather data:

```
<access_mcp_resource>
<server_name>weather-server</server_name>
<uri>weather://san-francisco/current</uri>
</access_mcp_resource>
```

Retrieving API documentation:

```
<access_mcp_resource>
<server_name>api-docs</server_name>
<uri>docs://payment-service/endpoints</uri>
</access_mcp_resource>
```

Accessing domain-specific knowledge:

```
<access_mcp_resource>
<server_name>knowledge-base</server_name>
<uri>kb://medical/terminology/common</uri>
</access_mcp_resource>
```

Fetching system configuration:

```
<access_mcp_resource>
<server_name>infra-monitor</server_name>
<uri>config://production/database</uri>
</access_mcp_resource>
```
Loading
Loading