### Install and Build REAPER MCP Server Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Commands to set up the development environment by installing dependencies and building the project. ```bash cd reaper-apidocs-mcp npm install npm run build ``` -------------------------------- ### Start HTTP Server for Network Use Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Starts the REAPER API server using the SSE (Server-Sent Events) transport, making it accessible over a network. The server typically runs on port 3001. ```bash npm run start:http # Access at http://localhost:3001/sse ``` -------------------------------- ### Full Server Test Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Runs a comprehensive test of the server functionality. This requires Node.js or Bun and involves building the project before starting the server. ```bash # Full server test (requires Node.js or Bun) npm run build npm start ``` -------------------------------- ### Start REAPER MCP Server Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Commands to launch the server in either stdio mode for local desktop integration or HTTP/SSE mode for network access. ```bash # stdio mode npm start # HTTP/SSE mode npm run start:http ``` -------------------------------- ### Docker Deployment Configuration Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Outlines the steps and configurations required to containerize the REAPER API server using Docker. This includes specifying the base image, copying source files, installing dependencies, building the project, exposing the port, and defining the command to run the server. ```dockerfile # Docker (Future) # Could be containerized with: # - Node.js base image # - Copy src/, docs/, package.json # - Run npm install && npm run build # - EXPOSE 3001 # - CMD ["npm", "run", "start:http"] ``` -------------------------------- ### reaper_list_by_prefix Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Lists all REAPER API functions that start with a specified prefix. ```APIDOC ## GET /reaper_list_by_prefix ### Description List all REAPER API functions starting with a specific prefix. ### Method GET ### Endpoint /reaper_list_by_prefix ### Parameters #### Query Parameters - **prefix** (string) - Required - The prefix to filter function names by (e.g., "Get", "Set", "Track") ### Request Example ```json { "prefix": "Get" } ``` ### Response #### Success Response (200) - **functions** (array) - An array of function names that start with the specified prefix. #### Response Example ```json { "functions": [ "GetTrack", "GetSelectedTrack", "GetTrackName", "GetTrackColor" ] } ``` ``` -------------------------------- ### List REAPER Functions by Prefix Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Lists all REAPER API functions that start with a specified prefix. This is useful for browsing functions related to a particular category, such as MIDI operations. Requires a prefix string as input. ```javascript // Tool call reaper_list_by_prefix({ prefix: "MIDI" }) // Returns all MIDI-related functions: // - MIDI_CountEvts // - MIDI_DeleteCC // - MIDI_DeleteEvt // - MIDI_DeleteNote // ... etc ``` -------------------------------- ### GET /functions/search Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Searches for functions based on a query string, matching against names, descriptions, and signatures. ```APIDOC ## GET /functions/search ### Description Performs a relevance-based search across the API documentation. ### Method GET ### Endpoint /functions/search ### Parameters #### Query Parameters - **query** (string) - Required - The search term. - **limit** (number) - Optional - Maximum number of results to return. ### Request Example GET /functions/search?query=track+color&limit=10 ### Response #### Success Response (200) - **results** (array) - List of matching function objects. #### Response Example [ { "name": "SetTrackColor", "description": "Set the color of a track..." }, { "name": "GetTrackColor", "description": "Get the color of a track..." } ] ``` -------------------------------- ### GET /stats Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Returns comprehensive statistics about the parsed REAPER API documentation. ```APIDOC ## GET /stats ### Description Returns metadata and counts regarding the current API documentation state. ### Method GET ### Endpoint /stats ### Response #### Success Response (200) - **totalFunctions** (integer) - Total count of parsed functions. - **deprecatedCount** (integer) - Number of deprecated functions. - **withLua** (integer) - Count of functions with Lua support. #### Response Example { "totalFunctions": 1247, "deprecatedCount": 23, "withLua": 1200 } ``` -------------------------------- ### Execute REAPER MCP Tools Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Examples of calling available MCP tools to search, list, and retrieve REAPER API function details. ```javascript reaper_get_function({ function_name: "GetTrack" }); reaper_search_functions({ query: "track", limit: 10 }); reaper_list_by_prefix({ prefix: "Get" }); reaper_api_stats({}); reaper_list_all_functions({ limit: 50 }); ``` -------------------------------- ### GET /functions/category/{prefix} Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Retrieves all functions that begin with a specific prefix, useful for grouping by module or category. ```APIDOC ## GET /functions/category/{prefix} ### Description Returns a list of all functions whose names start with the provided prefix. ### Method GET ### Endpoint /functions/category/{prefix} ### Parameters #### Path Parameters - **prefix** (string) - Required - The function prefix (e.g., 'MIDI'). ### Response #### Success Response (200) - **functions** (array) - List of function objects matching the prefix. #### Response Example [ { "name": "MIDI_CountEvts" }, { "name": "MIDI_DeleteCC" } ] ``` -------------------------------- ### Get REAPER Function Details Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Retrieves detailed documentation for a specific REAPER API function, including its signature across multiple languages (Lua, Python, C/C++, EEL) and a description. Requires the function name as input. ```javascript // Tool call reaper_get_function({ function_name: "GetTrack" }) // Returns complete documentation with: // - Lua: MediaTrack reaper.GetTrack(ReaProject proj, integer trackidx) // - Python: MediaTrack RPR_GetTrack(ReaProject proj, Int trackidx) // - C/C++: MediaTrack* GetTrack(ReaProject* proj, int trackidx) // - EEL: MediaTrack GetTrack(ReaProject proj, trackidx) // - Description: get a track from a project by track count... ``` -------------------------------- ### Development and Build Commands (Bash) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md These bash commands are used for managing the development and production builds of the FastMCP server. They cover installing dependencies, running in development mode with auto-reloading (stdio and HTTP), and building for production. ```bash # Install dependencies npm install # Run in development mode with auto-reload npm run dev # stdio mode npm run dev:http # HTTP mode # Build for production npm run build npm run build:http ``` -------------------------------- ### List REAPER API functions by prefix via MCP Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Uses the reaper_list_by_prefix tool to retrieve a list of functions starting with a specific string, facilitating category-based browsing. ```json { "name": "reaper_list_by_prefix", "parameters": { "prefix": "MIDI" } } ``` -------------------------------- ### GET /functions/{name} Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Retrieves a specific REAPER function by name, supporting case-insensitive matching and multiple naming conventions. ```APIDOC ## GET /functions/{name} ### Description Retrieves a specific function by name. Supports bare names, Lua-style (reaper.FunctionName), and Python-style (RPR_FunctionName). ### Method GET ### Endpoint /functions/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the function to retrieve. ### Request Example GET /functions/GetTrack ### Response #### Success Response (200) - **name** (string) - The canonical function name. - **signatures** (object) - Object containing language-specific signatures (lua, python, c, eel). #### Response Example { "name": "GetTrack", "signatures": { "lua": "MediaTrack reaper.GetTrack(ReaProject proj, integer trackidx)" } } ``` -------------------------------- ### Utilize REAPER API MCP Prompts Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Provides templates for script assistance and API exploration. These prompts leverage MCP tools to guide AI in generating accurate REAPER ReaScript code. ```json { "name": "reaper_script_helper", "arguments": { "task": "Create a marker at the current cursor position with a timestamp name", "language": "lua" } } { "name": "explore_reaper_api", "arguments": { "domain": "fx" } } ``` -------------------------------- ### Retrieve REAPER API documentation statistics via MCP Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Uses the reaper_api_stats tool to get an overview of the API, including total function counts and language support breakdown. ```json { "name": "reaper_api_stats", "parameters": {} } ``` -------------------------------- ### Get REAPER Function by Name (TypeScript) Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Retrieves a specific REAPER API function by its name. Supports case-insensitive matching and multiple naming conventions (bare, Lua-style, Python-style). Requires the ReaperApiParser class. ```typescript import { ReaperApiParser } from './core/services/reaper-api-parser'; // Get function by exact name const func = ReaperApiParser.getFunction('GetTrack'); console.log(func?.signatures.lua); // Output: "MediaTrack reaper.GetTrack(ReaProject proj, integer trackidx)" // Works with Lua-style prefix const luaFunc = ReaperApiParser.getFunction('reaper.GetTrack'); console.log(luaFunc?.name); // Output: "GetTrack" // Works with Python-style prefix const pyFunc = ReaperApiParser.getFunction('RPR_GetTrack'); console.log(pyFunc?.signatures.python); // Output: "MediaTrack RPR_GetTrack(ReaProject proj, Int trackidx)" ``` -------------------------------- ### Get REAPER API Statistics (TypeScript) Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Fetches comprehensive statistics about the parsed REAPER API documentation. Includes counts for total functions, deprecated functions, and functions available in Lua, Python, C, and EEL scripting languages. Requires the ReaperApiParser class. ```typescript import { ReaperApiParser } from './core/services/reaper-api-parser'; const stats = ReaperApiParser.getStats(); console.log(JSON.stringify(stats, null, 2)); // Output: // { // "totalFunctions": 1247, // "deprecatedCount": 23, // "withLua": 1200, // "withPython": 1198, // "withC": 1245, // "withEEL": 1150 // } ``` -------------------------------- ### Create Marker at Cursor Position (Lua) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md This Lua script creates a marker at the current cursor position in the REAPER project. It uses REAPER API functions to get the cursor position and add a new marker. The script outputs the index of the created marker or an error message. ```lua local proj = reaper.EnumProjects(-1, "") local cursor_pos = reaper.GetCursorPosition() local marker_idx = reaper.AddProjectMarker(proj, false, cursor_pos, 0, "My Marker", -1) if marker_idx >= 0 then reaper.ShowConsoleMsg("Marker created at index " .. marker_idx .. "\n") else reaper.ShowConsoleMsg("Failed to create marker\n") end ``` -------------------------------- ### Get REAPER Functions by Category Prefix (TypeScript) Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Retrieves all REAPER API functions whose names begin with a specified prefix. Useful for grouping functions related to a particular area, like MIDI. Requires the ReaperApiParser class. ```typescript import { ReaperApiParser } from './core/services/reaper-api-parser'; // Get all MIDI-related functions const midiFunctions = ReaperApiParser.getFunctionsByCategory('MIDI'); console.log(`Found ${midiFunctions.length} MIDI functions`); // Output: "Found 45 MIDI functions" midiFunctions.slice(0, 5).forEach(f => console.log(f.name)); // Output: // MIDI_CountEvts // MIDI_DeleteCC // MIDI_DeleteEvt // MIDI_DeleteNote // MIDI_DisableSort ``` -------------------------------- ### Initialize FastMCP Server Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Demonstrates the initialization of a FastMCP server instance. It supports both stdio and SSE transport types for local or network-based communication. ```typescript import { FastMCP } from "fastmcp"; const server = new FastMCP({ name: "my-mcp-server", version: "1.0.0" }); // Start with stdio for Cursor/Claude Desktop // server.start({ transportType: "stdio" }); // Start with SSE for web clients server.start({ transportType: "sse", port: 3001 }); ``` -------------------------------- ### Test and Run MCP Server Template Commands Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Commands for testing the template generator locally, running the generated MCP server in stdio or HTTP/SSE modes, and managing development with auto-reload. ```bash # Test in a temp directory mkdir /tmp/test-mcp-server && cd /tmp/test-mcp-server npx /path/to/this/repo # Test the generated server cd /tmp/test-mcp-server bun install bun start # stdio mode bun run start:http # HTTP mode # Development with auto-reload bun run dev # stdio mode with watch bun run dev:http # HTTP mode with watch ``` -------------------------------- ### Build and Release MCP Server Template Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Commands for building the project for distribution, managing versioning, and generating changelogs. These commands ensure the template is correctly bundled for npm publication. ```bash # Build for distribution bun run build # Builds src/index.ts → build/index.js bun run build:http # Builds http-server.ts → build/http-server.js bun run prepublishOnly # Builds both # Versioning and release bun run version:patch bun run release # npm publish --access public # Changelog generation bun run changelog # Full CHANGELOG.md bun run changelog:latest # RELEASE_NOTES.md for latest version ``` -------------------------------- ### Prompt Definition Pattern (FastMCP API) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Defines a prompt for the FastMCP framework. Includes a name, description, arguments, and an asynchronous loader function to generate the prompt text. ```typescript server.addPrompt({ name: "prompt_name", description: "What it does", arguments: [{ name: "arg", description: "...", required: true }], load: async ({ arg }) => { return "prompt text"; // Return string or message array } }); ``` -------------------------------- ### Inspect MCP Server Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Uses the FastMCP inspector tool to validate the server implementation, tools, and resources defined in the entry file. ```bash npx fastmcp inspect src/index.ts ``` -------------------------------- ### Tool Definition Pattern (FastMCP API) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Defines a tool for use with the FastMCP framework. Includes name, description for LLM, Zod schema for parameter validation, and an asynchronous execution function. ```typescript server.addTool({ name: "tool_name", // Snake_case, shown to LLM description: "What it does", // Clear description for LLM parameters: z.object({ // Zod schema for validation param1: z.string().describe("Help text"), }), execute: async (params) => { // Implementation return "result"; // Can be string or object } }); ``` -------------------------------- ### Verify MCP Project Structure Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Shell commands to verify the integrity of a generated MCP server project. These commands check the file system structure and ensure the package configuration is correct. ```bash ls -la cat package.json ls -la src/ ``` -------------------------------- ### Resource Template Definition Pattern (FastMCP API) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Defines a resource template for the FastMCP framework. Specifies a URI template, display name, MIME type, arguments, and an asynchronous loader function to fetch resource content. ```typescript server.addResourceTemplate({ uriTemplate: "scheme://{param}", // URI with placeholders name: "Display Name", mimeType: "text/plain", // Content type arguments: [{ name: "param", description: "...", required: true }], async load({ param }) { // Loader function return { text: "content" }; // Return object with text/blob } }); ``` -------------------------------- ### Correct Module Imports with .js Extension (TypeScript) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Ensures correct module resolution in generated projects by appending the '.js' extension to import statements, even for TypeScript files. This resolves 'Cannot find module' errors. ```typescript // Correct import { registerTools } from "../core/tools.js"; // Wrong import { registerTools } from "../core/tools"; ``` -------------------------------- ### Access REAPER API Resources via URI Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Demonstrates how to retrieve API documentation for specific functions, categories, or general overviews using MCP resource URIs. These resources return markdown-formatted content detailing function signatures and descriptions. ```typescript // Resource URI for a specific function "reaper://function/GetTrack" // Resource URI for a category "reaper://category/Insert" // Resource URI for overview "reaper://overview" ``` -------------------------------- ### REAPER API Parser Service (TypeScript) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md A TypeScript service designed to parse the REAPER API HTML documentation. It extracts function signatures for C, EEL, Lua, and Python, caches parsed functions, and provides search and retrieval capabilities. ```typescript import { promises as fs } from 'fs'; import * as cheerio from 'cheerio'; interface FunctionSignature { c_func?: string; e_func?: string; l_func?: string; p_func?: string; } interface ReaperApiFunction { id: string; description: string; signatures: FunctionSignature; isDeprecated: boolean; } class ReaperApiParserService { private cache: Map = new Map(); private htmlContent: string | null = null; async loadApiDocs(filePath: string): Promise { if (!this.htmlContent) { try { this.htmlContent = await fs.readFile(filePath, 'utf-8'); this.parseHtml(); } catch (error) { console.error(`Error loading or parsing API docs: ${error}`); this.htmlContent = null; } } } private parseHtml(): void { if (!this.htmlContent) return; const $ = cheerio.load(this.htmlContent); const functionRegex = /
([\s\S]*?)
/g; let match; while ((match = functionRegex.exec(this.htmlContent)) !== null) { const id = match[1]; const content = match[2]; const functionContent$ = cheerio.load(content); const description = functionContent$('p').first().text(); const isDeprecated = functionContent$('.deprecated').length > 0; const signatures: FunctionSignature = {}; functionContent$('.signature').each((_, element) => { const lang = $(element).attr('lang'); if (lang && ['c', 'eel', 'lua', 'python'].includes(lang)) { signatures[lang as keyof FunctionSignature] = $(element).text(); } }); this.cache.set(id.toLowerCase(), { id, description, signatures, isDeprecated }); } } getFunction(name: string): ReaperApiFunction | undefined { return this.cache.get(name.toLowerCase()); } searchFunctions(query: string): ReaperApiFunction[] { const lowerQuery = query.toLowerCase(); const results: ReaperApiFunction[] = []; for (const func of this.cache.values()) { if ( func.id.toLowerCase().includes(lowerQuery) || func.description.toLowerCase().includes(lowerQuery) || Object.values(func.signatures).some(sig => sig?.toLowerCase().includes(lowerQuery)) ) { results.push(func); } } // Implement relevance sorting here return results; } listByPrefix(prefix: string): ReaperApiFunction[] { const lowerPrefix = prefix.toLowerCase(); const results: ReaperApiFunction[] = []; for (const func of this.cache.values()) { if (func.id.toLowerCase().startsWith(lowerPrefix)) { results.push(func); } } return results.sort((a, b) => a.id.localeCompare(b.id)); } getApiStats(): Record { const stats: Record = { total: this.cache.size, deprecated: 0 }; for (const func of this.cache.values()) { if (func.isDeprecated) { stats.deprecated++; } for (const lang in func.signatures) { if (!stats[lang]) { stats[lang] = 0; } stats[lang]++; } } return stats; } listAllFunctions(): ReaperApiFunction[] { return Array.from(this.cache.values()).sort((a, b) => a.id.localeCompare(b.id)); } } export const reaperApiParser = new ReaperApiParserService(); ``` -------------------------------- ### Basic HTML Parsing Test Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Executes a basic test for HTML parsing, which does not require compilation. This is typically run using Node.js. ```bash # Basic HTML parsing test (no compilation needed) node test-basic.js ``` -------------------------------- ### Inspect with MCP Inspector Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Uses the fastMCP tool to inspect the TypeScript source files of the project. This command-line utility helps in analyzing the project structure and code. ```bash # Test with MCP Inspector npx fastmcp inspect src/index.ts ``` -------------------------------- ### Configure MCP Server Transport Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Instructions for setting up the REAPER API server using stdio for local applications or HTTP/SSE for network-based access. ```json // Claude Desktop / Cursor stdio configuration { "mcpServers": { "reaper-api": { "command": "node", "args": ["/path/to/reaper-apidocs-mcp/build/index.js"] } } } ``` ```bash # Start the HTTP server npm run start:http # Start with custom port PORT=8080 npm run start:http ``` ```json // Cursor MCP configuration for SSE { "mcpServers": { "reaper-api": { "url": "http://localhost:3001/sse" } } } ``` -------------------------------- ### Test MCP Server Transport Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/CLAUDE.md Commands to validate that the generated MCP server functions correctly in both stdio and SSE modes. These are typically run within the generated project directory. ```bash bun install bun start bun run start:http ``` -------------------------------- ### Configure MCP Server for Claude and Cursor Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md JSON configuration structures for integrating the REAPER MCP server into Claude Desktop and Cursor IDE settings. ```json { "mcpServers": { "reaper-api": { "command": "node", "args": [ "/path/to/reaper-apidocs-mcp/build/index.js" ] } } } ``` ```json { "mcpServers": { "reaper-api": { "url": "http://localhost:3001/sse" } } } ``` -------------------------------- ### Retrieve REAPER API function details via MCP Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Uses the reaper_get_function tool to fetch documentation, signatures, and descriptions for a specific REAPER API function. It supports various naming conventions like standard, Lua, and Python styles. ```json { "name": "reaper_get_function", "parameters": { "function_name": "GetTrack" } } ``` -------------------------------- ### List all REAPER API functions via MCP Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Uses the reaper_list_all_functions tool to retrieve an alphabetically sorted list of all API functions, useful for autocomplete or broad exploration. ```json { "name": "reaper_list_all_functions", "parameters": { "limit": 50 } } ``` -------------------------------- ### Search REAPER Functions Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md Finds functions related to a given query. It takes a query string and an optional limit for the number of results. Returns a list of matching function names. ```javascript // Tool call reaper_search_functions({ query: "track", limit: 10 }) // Returns functions like: // - GetTrack // - GetSelectedTrack // - InsertTrackAtIndex // - DeleteTrack // - CountTracks // ... etc ``` -------------------------------- ### reaper_get_function Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Retrieves detailed documentation for a specific REAPER API function by its name. ```APIDOC ## GET /reaper_get_function ### Description Get detailed documentation for a specific REAPER API function. ### Method GET ### Endpoint /reaper_get_function ### Parameters #### Query Parameters - **function_name** (string) - Required - Name of the function (e.g., "AddProjectMarker", "reaper.GetTrack") ### Request Example ```json { "function_name": "GetTrack" } ``` ### Response #### Success Response (200) - **documentation** (string) - The detailed documentation for the requested function. #### Response Example ```json { "documentation": "GetTrack(int trackidx) \n\nGet a track by index.\nParameters:\n trackidx (int): The index of the track.\nReturns:\n (MediaTrack): The MediaTrack object for the specified track index.\n\nLanguages:\n C:\n MediaTrack *GetTrack(int trackidx);\n EEL:\n track GetTrack(int trackidx);\n Lua:\n reaper.GetTrack(integer trackidx) \n Python:\n reaper.GetTrack(trackidx) \n" } ``` ``` -------------------------------- ### reaper_list_all_functions Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Retrieves a complete list of all available REAPER API function names. ```APIDOC ## GET /reaper_list_all_functions ### Description Get a complete list of all REAPER API function names. ### Method GET ### Endpoint /reaper_list_all_functions ### Parameters #### Query Parameters - **limit** (number) - Optional - Maximum number of functions to return (default: 100) ### Request Example ```json { "limit": 50 } ``` ### Response #### Success Response (200) - **functions** (array) - An array of all REAPER API function names. #### Response Example ```json { "functions": [ "AddProjectMarker", "DeleteProjectMarker", "GetTrack", "SetTrackName", "CountSelectedTracks" ] } ``` ``` -------------------------------- ### Extract REAPER API Function Blocks using Regex (JavaScript) Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/IMPLEMENTATION.md This JavaScript regex is used to extract individual function definition blocks from the REAPER API HTML documentation. It captures the function's ID and its entire HTML content within a 'div' tag. ```javascript
([\s\S]*?)
``` -------------------------------- ### Search REAPER API functions via MCP Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Uses the reaper_search_functions tool to perform keyword searches across function names, descriptions, and signatures. Results are returned with relevance-based sorting. ```json { "name": "reaper_search_functions", "parameters": { "query": "marker", "limit": 5 } } ``` -------------------------------- ### Search REAPER Functions (TypeScript) Source: https://context7.com/hydromel-project/reaper-apidocs-mcp/llms.txt Searches REAPER API functions based on a query string, matching against names, descriptions, and signatures. Results are sorted by relevance and can be limited by a specified number. Requires the ReaperApiParser class. ```typescript import { ReaperApiParser } from './core/services/reaper-api-parser'; // Search for track-related functions const results = ReaperApiParser.searchFunctions('track color', 10); results.forEach(func => { console.log(`${func.name}: ${func.description.substring(0, 50)}...`); }); // Output: // SetTrackColor: Set the color of a track... // GetTrackColor: Get the color of a track... // ... ``` -------------------------------- ### reaper_api_stats Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Retrieves statistics about the REAPER API documentation, such as the total number of functions. ```APIDOC ## GET /reaper_api_stats ### Description Get an overview of statistics about the REAPER API documentation. ### Method GET ### Endpoint /reaper_api_stats ### Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **total_functions** (integer) - The total number of documented REAPER API functions. - **last_updated** (string) - The date and time when the API documentation was last updated. #### Response Example ```json { "total_functions": 1500, "last_updated": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### reaper_search_functions Source: https://github.com/hydromel-project/reaper-apidocs-mcp/blob/main/README.md Searches REAPER API functions by a given keyword, returning a list of matching functions. ```APIDOC ## GET /reaper_search_functions ### Description Search REAPER API functions by keyword across names, descriptions, and signatures. ### Method GET ### Endpoint /reaper_search_functions ### Parameters #### Query Parameters - **query** (string) - Required - Search query (e.g., "track", "marker", "midi") - **limit** (number) - Optional - Maximum number of results to return (default: 20, max: 100) ### Request Example ```json { "query": "track", "limit": 10 } ``` ### Response #### Success Response (200) - **functions** (array) - An array of objects, where each object contains information about a matching function. - **name** (string) - The name of the function. - **description** (string) - A brief description of the function. - **signature** (string) - The function's signature. #### Response Example ```json { "functions": [ { "name": "GetTrack", "description": "Get a track by index.", "signature": "MediaTrack *GetTrack(int trackidx)" }, { "name": "GetSelectedTrack", "description": "Get a selected track by its index.", "signature": "MediaTrack *GetSelectedTrack(int selidx)" } ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.