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,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Set device volume' implies a mutation operation but doesn't specify whether this requires special permissions, affects system-wide or app-specific settings, has side effects, or provides any feedback/confirmation. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, with zero wasted language. It's front-loaded with the core action and target, making it immediately understandable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address what happens after setting the volume (success/failure indicators), potential side effects, or system constraints. Given the complexity of device operations and lack of structured behavioral hints, more context would be needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters (streamType with enum values and volume with range). The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Set device volume' clearly states the action (set) and target (device volume), which is a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'mqscript_device_setbrightness' or other device-related tools, making it somewhat generic within the context of this server's toolset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are no mentions of prerequisites, context requirements, or comparisons to sibling tools like 'mqscript_device_getinfo' or other volume-related functions that might exist in the broader system.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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