Skip to main content
Glama
steveclarke

MCP Printer Server

by steveclarke

get_config

Retrieve current configuration settings for the MCP Printer Server, including environment variables and their values.

Instructions

Get the current MCP Printer configuration settings. Returns environment variables and their current values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get_config' tool using server.registerTool, including schema definition and inline handler function that returns formatted configuration data from imported config.
    server.registerTool( "get_config", { title: "Get Configuration", description: "Get the current MCP Printer configuration settings. Returns environment variables and their current values.", inputSchema: {}, }, () => { const configData = { MCP_PRINTER_DEFAULT_PRINTER: config.defaultPrinter || "(not set)", MCP_PRINTER_AUTO_DUPLEX: config.autoDuplex ? "true" : "false", MCP_PRINTER_DEFAULT_OPTIONS: config.defaultOptions.length > 0 ? config.defaultOptions.join(" ") : "(not set)", MCP_PRINTER_CHROME_PATH: config.chromePath || "(auto-detected)", MCP_PRINTER_AUTO_RENDER_MARKDOWN: config.autoRenderMarkdown ? "true" : "false", MCP_PRINTER_AUTO_RENDER_CODE: config.autoRenderCode ? "true" : "false", MCP_PRINTER_ENABLE_MANAGEMENT: config.enableManagement ? "true" : "false", MCP_PRINTER_ENABLE_PROMPTS: config.enablePrompts ? "true" : "false", MCP_PRINTER_CONFIRM_IF_OVER_PAGES: config.confirmIfOverPages > 0 ? String(config.confirmIfOverPages) : "0 (disabled)", MCP_PRINTER_ALLOWED_PATHS: config.allowedPaths.join(":"), MCP_PRINTER_DENIED_PATHS: config.deniedPaths.join(":"), MCP_PRINTER_CODE_EXCLUDE_EXTENSIONS: config.code.excludeExtensions.length > 0 ? config.code.excludeExtensions.join(", ") : "(not set)", MCP_PRINTER_CODE_COLOR_SCHEME: config.code.colorScheme, MCP_PRINTER_CODE_AUTO_LINE_NUMBERS: config.code.autoLineNumbers ? "true" : "false", MCP_PRINTER_CODE_FONT_SIZE: config.code.fontSize, MCP_PRINTER_CODE_LINE_SPACING: config.code.lineSpacing, } const configText = Object.entries(configData) .map(([key, value]) => `${key}: ${value}`) .join("\n") return { content: [ { type: "text", text: `Current MCP Printer Configuration:\n\n${configText}`, }, ], } } )
  • Inline handler function for 'get_config' tool that constructs and formats configuration data from the imported config object, returning it as MCP content.
    () => { const configData = { MCP_PRINTER_DEFAULT_PRINTER: config.defaultPrinter || "(not set)", MCP_PRINTER_AUTO_DUPLEX: config.autoDuplex ? "true" : "false", MCP_PRINTER_DEFAULT_OPTIONS: config.defaultOptions.length > 0 ? config.defaultOptions.join(" ") : "(not set)", MCP_PRINTER_CHROME_PATH: config.chromePath || "(auto-detected)", MCP_PRINTER_AUTO_RENDER_MARKDOWN: config.autoRenderMarkdown ? "true" : "false", MCP_PRINTER_AUTO_RENDER_CODE: config.autoRenderCode ? "true" : "false", MCP_PRINTER_ENABLE_MANAGEMENT: config.enableManagement ? "true" : "false", MCP_PRINTER_ENABLE_PROMPTS: config.enablePrompts ? "true" : "false", MCP_PRINTER_CONFIRM_IF_OVER_PAGES: config.confirmIfOverPages > 0 ? String(config.confirmIfOverPages) : "0 (disabled)", MCP_PRINTER_ALLOWED_PATHS: config.allowedPaths.join(":"), MCP_PRINTER_DENIED_PATHS: config.deniedPaths.join(":"), MCP_PRINTER_CODE_EXCLUDE_EXTENSIONS: config.code.excludeExtensions.length > 0 ? config.code.excludeExtensions.join(", ") : "(not set)", MCP_PRINTER_CODE_COLOR_SCHEME: config.code.colorScheme, MCP_PRINTER_CODE_AUTO_LINE_NUMBERS: config.code.autoLineNumbers ? "true" : "false", MCP_PRINTER_CODE_FONT_SIZE: config.code.fontSize, MCP_PRINTER_CODE_LINE_SPACING: config.code.lineSpacing, } const configText = Object.entries(configData) .map(([key, value]) => `${key}: ${value}`) .join("\n") return { content: [ { type: "text", text: `Current MCP Printer Configuration:\n\n${configText}`, }, ], } }
  • Input schema for 'get_config' tool, which is empty object indicating no input parameters required.
    { title: "Get Configuration", description: "Get the current MCP Printer configuration settings. Returns environment variables and their current values.", inputSchema: {}, },

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/steveclarke/mcp-printer'

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