Skip to main content
Glama
camiloluvino

Roam Research MCP Server

by camiloluvino

roam_markdown_cheatsheet

Access Roam Research's markdown formatting guide to learn syntax for creating and editing content in your knowledge graph.

Instructions

Provides the content of the Roam Markdown Cheatsheet resource, optionally concatenated with custom instructions if CUSTOM_INSTRUCTIONS_PATH is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that loads, caches, and returns the Roam Markdown Cheatsheet content, optionally appending custom instructions from an environment-specified path.
    async getRoamMarkdownCheatsheet() { if (this.cachedCheatsheet) { return this.cachedCheatsheet; } const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const cheatsheetPath = path.join(__dirname, '../../Roam_Markdown_Cheatsheet.md'); try { let cheatsheetContent = await fs.promises.readFile(cheatsheetPath, 'utf-8'); const customInstructionsPath = process.env.CUSTOM_INSTRUCTIONS_PATH; if (customInstructionsPath) { try { // Check if file exists asynchronously await fs.promises.access(customInstructionsPath); const customInstructionsContent = await fs.promises.readFile(customInstructionsPath, 'utf-8'); cheatsheetContent += `\n\n${customInstructionsContent}`; } catch (error) { // File doesn't exist or is not readable, ignore custom instructions if ((error as NodeJS.ErrnoException).code !== 'ENOENT') { console.warn(`Could not read custom instructions file at ${customInstructionsPath}: ${error}`); } } } this.cachedCheatsheet = cheatsheetContent; return cheatsheetContent; } catch (error) { throw new Error(`Failed to read cheatsheet: ${error}`); } }
  • The schema definition for the 'roam_markdown_cheatsheet' tool, including name, description, and empty input schema (no parameters required).
    [toolName(BASE_TOOL_NAMES.MARKDOWN_CHEATSHEET)]: { name: toolName(BASE_TOOL_NAMES.MARKDOWN_CHEATSHEET), description: 'Provides the content of the Roam Markdown Cheatsheet resource, optionally concatenated with custom instructions if CUSTOM_INSTRUCTIONS_PATH is set.', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • The registration and dispatching logic in the MCP server request handler that routes calls to 'roam_markdown_cheatsheet' to the corresponding tool handler method.
    case BASE_TOOL_NAMES.MARKDOWN_CHEATSHEET: { const content = await this.toolHandlers.getRoamMarkdownCheatsheet(); return { content: [{ type: 'text', text: content }], }; }

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/camiloluvino/roamMCP'

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