Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_device_setvolume

Control mobile device audio volume levels for music, ring, alarm, or notification streams using precise numeric values from 0 to 15.

Instructions

Set device volume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
streamTypeNoVolume stream typemusic
volumeYesVolume level (0-15)

Implementation Reference

  • The handler function that implements the core logic of the 'mqscript_device_setvolume' tool. It destructures the input arguments, generates the corresponding MQScript command 'Device.SetVolume(volume, streamType)', and returns a formatted text response containing the generated script.
    handler: async (args: { volume: number; streamType?: string }) => { const { volume, streamType = 'music' } = args; const script = `Device.SetVolume(${volume}, "${streamType}")`; return { content: [ { type: 'text', text: `Generated MQScript set volume command:\n\`\`\`\n${script}\n\`\`\`\n\nThis sets ${streamType} volume to ${volume}.` } ] }; } }
  • The input schema defining the parameters for the tool: required 'volume' (number 0-15) and optional 'streamType' (enum with default 'music'). Used for validation in MCP tool calls.
    inputSchema: { type: 'object' as const, properties: { volume: { type: 'number', description: 'Volume level (0-15)', minimum: 0, maximum: 15 }, streamType: { type: 'string', description: 'Volume stream type', enum: ['music', 'ring', 'alarm', 'notification'], default: 'music' } }, required: ['volume'] },
  • src/index.ts:52-52 (registration)
    The DeviceCommands object containing the 'mqscript_device_setvolume' tool definition is spread into the ALL_TOOLS registry, making it available for listing and execution via the MCP server.
    ...DeviceCommands,

Other Tools

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/allegiant/MQScript_MCP'

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