Skip to main content
Glama
steveclarke

MCP Printer Server

by steveclarke

list_printers

Discover available printers and their current status to identify which devices are ready for printing tasks.

Instructions

List all available printers on the system with their status. Returns printer names, states, and whether they're accepting jobs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that runs the 'lpstat -p -d' command to list all available printers and their status, returning the output as text content.
    async () => { const output = await execCommand("lpstat", ["-p", "-d"]) return { content: [ { type: "text", text: output || "No printers found", }, ], } }
  • Input schema for the list_printers tool (empty, no input parameters required), including title and description.
    { title: "List Printers", description: "List all available printers on the system with their status. Returns printer names, states, and whether they're accepting jobs.", inputSchema: {}, },
  • Direct registration of the list_printers tool with the MCP server, specifying schema and inline handler.
    server.registerTool( "list_printers", { title: "List Printers", description: "List all available printers on the system with their status. Returns printer names, states, and whether they're accepting jobs.", inputSchema: {}, }, async () => { const output = await execCommand("lpstat", ["-p", "-d"]) return { content: [ { type: "text", text: output || "No printers found", }, ], } } )
  • Top-level registration call to registerPrinterTools within registerAllTools, which includes the list_printers tool.
    registerPrinterTools(server)

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