Skip to main content
Glama
steveclarke

MCP Printer Server

by steveclarke

get_print_queue

Check print queue status to view pending and active print jobs for specific printers or all printers, helping monitor printing progress and identify queued documents.

Instructions

Check the print queue for a specific printer or all printers. Shows pending and active print jobs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
printerNoPrinter name to check queue for (optional, checks all if not specified)

Implementation Reference

  • Handler function for the 'get_print_queue' tool. Runs the 'lpq' command (optionally specifying a printer) to fetch the current print queue status and returns it as text content.
    async ({ printer }) => { const lpqArgs: string[] = [] if (printer) { lpqArgs.push("-P", printer) } const output = await execCommand("lpq", lpqArgs) return { content: [ { type: "text", text: output || "No print jobs in queue", }, ], } } )
  • Input schema and metadata (title, description) for the 'get_print_queue' tool, defining an optional 'printer' string parameter using Zod.
    { title: "Get Print Queue", description: "Check the print queue for a specific printer or all printers. Shows pending and active print jobs.", inputSchema: { printer: z .string() .optional() .describe("Printer name to check queue for (optional, checks all if not specified)"), }, },
  • Registration of the 'get_print_queue' tool on the MCP server, including schema, metadata, and inline handler function.
    server.registerTool( "get_print_queue", { title: "Get Print Queue", description: "Check the print queue for a specific printer or all printers. Shows pending and active print jobs.", inputSchema: { printer: z .string() .optional() .describe("Printer name to check queue for (optional, checks all if not specified)"), }, }, async ({ printer }) => { const lpqArgs: string[] = [] if (printer) { lpqArgs.push("-P", printer) } const output = await execCommand("lpq", lpqArgs) return { content: [ { type: "text", text: output || "No print jobs in queue", }, ], } } )

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