Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_device_setbrightness

Adjust screen brightness on mobile devices by specifying a level from 0 to 255 for automation scripts.

Instructions

Set screen brightness

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brightnessYesBrightness level (0-255)

Implementation Reference

  • The tool handler function that receives the brightness value and generates the corresponding MQScript command `Device.SetBrightness(brightness)` along with a descriptive response.
    handler: async (args: { brightness: number }) => {
      const { brightness } = args;
      const script = `Device.SetBrightness(${brightness})`;
      return {
        content: [
          {
            type: 'text',
            text: `Generated MQScript set brightness command:\n\`\`\`\n${script}\n\`\`\`\n\nThis sets screen brightness to ${brightness}.`
          }
        ]
      };
    }
  • The input schema defining the required 'brightness' parameter as a number between 0 and 255.
    inputSchema: {
      type: 'object' as const,
      properties: {
        brightness: {
          type: 'number',
          description: 'Brightness level (0-255)',
          minimum: 0,
          maximum: 255
        }
      },
      required: ['brightness']
    },
  • The complete tool registration object within DeviceCommands, which is spread into the ALL_TOOLS registry.
    setBrightness: {
      name: 'mqscript_device_setbrightness',
      description: 'Set screen brightness',
      inputSchema: {
        type: 'object' as const,
        properties: {
          brightness: {
            type: 'number',
            description: 'Brightness level (0-255)',
            minimum: 0,
            maximum: 255
          }
        },
        required: ['brightness']
      },
      handler: async (args: { brightness: number }) => {
        const { brightness } = args;
        const script = `Device.SetBrightness(${brightness})`;
        return {
          content: [
            {
              type: 'text',
              text: `Generated MQScript set brightness command:\n\`\`\`\n${script}\n\`\`\`\n\nThis sets screen brightness to ${brightness}.`
            }
          ]
        };
      }
    },
  • src/index.ts:54-54 (registration)
    Spreading DeviceCommands into ALL_TOOLS object used for tool lookup and registration in MCP server handlers.
    ...SysCommands,
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 screen brightness' implies a mutation operation, but it lacks details on permissions required, whether changes persist, error conditions (e.g., invalid brightness), or system impact (e.g., battery usage). This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, clear sentence with zero wasted words. It is front-loaded with the core action ('Set screen brightness'), 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.

Completeness3/5

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

For a single-parameter mutation tool with no annotations or output schema, the description is minimally adequate. It states the purpose clearly but lacks behavioral context (e.g., side effects, errors) and usage guidelines. Given the simplicity of the tool, it's functional but could be more informative.

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, with the 'brightness' parameter fully documented (range 0-255). The description adds no additional parameter semantics beyond what the schema provides, such as typical values or effects at extremes. This meets the baseline of 3 when schema coverage is high.

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

Purpose4/5

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

The description 'Set screen brightness' clearly states the verb ('Set') and resource ('screen brightness'), making the tool's purpose immediately understandable. It distinguishes from siblings like 'mqscript_device_getinfo' (read) and 'mqscript_device_setvolume' (different setting), though it doesn't explicitly contrast with them.

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?

No guidance is provided on when to use this tool versus alternatives. While the context implies it's for adjusting screen brightness, there's no mention of prerequisites (e.g., device permissions), side effects, or comparison to similar tools like 'mqscript_dim' (which might adjust brightness in a different context).

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