Skip to main content
Glama
wave-av

WAVE MCP Server

Official
by wave-av

wave_control_camera

Control PTZ camera movements including pan, tilt, zoom, focus, and recall or store presets by specifying camera ID and action.

Instructions

Control a PTZ camera (pan, tilt, zoom, focus, recall preset)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
camera_idYesThe camera ID
actionYesCamera control action
panNoPan speed (-1 to 1)
tiltNoTilt speed (-1 to 1)
zoomNoZoom speed (-1 to 1)
preset_idNoPreset ID for recall/store

Implementation Reference

  • Registration of the wave_control_camera tool via server.tool() with its schema definition.
    server.tool(
      "wave_control_camera",
      "Control a PTZ camera (pan, tilt, zoom, focus, recall preset)",
      {
        camera_id: z.string().uuid().describe("The camera ID"),
        action: z
          .enum(["move", "zoom", "focus", "recall_preset", "store_preset"])
          .describe("Camera control action"),
        pan: z.number().min(-1).max(1).optional().describe("Pan speed (-1 to 1)"),
        tilt: z.number().min(-1).max(1).optional().describe("Tilt speed (-1 to 1)"),
        zoom: z.number().min(-1).max(1).optional().describe("Zoom speed (-1 to 1)"),
        preset_id: z.string().optional().describe("Preset ID for recall/store"),
      },
      async ({ camera_id, action, pan, tilt, zoom, preset_id }) => {
        const payload: Record<string, unknown> = { type: action };
        if (pan !== undefined) payload["pan"] = pan;
        if (tilt !== undefined) payload["tilt"] = tilt;
        if (zoom !== undefined) payload["zoom"] = zoom;
        if (preset_id !== undefined) payload["presetId"] = preset_id;
    
        const res = await waveFetch(`/api/v1/cameras/${camera_id}/control`, {
          method: "POST",
          body: JSON.stringify(payload),
        });
        if (!res.ok) return errorContent(res.status, res.body);
        return textContent(res.body);
      },
    );
  • Handler function that builds a payload and sends a POST request to /api/v1/cameras/${camera_id}/control to control a PTZ camera.
    async ({ camera_id, action, pan, tilt, zoom, preset_id }) => {
      const payload: Record<string, unknown> = { type: action };
      if (pan !== undefined) payload["pan"] = pan;
      if (tilt !== undefined) payload["tilt"] = tilt;
      if (zoom !== undefined) payload["zoom"] = zoom;
      if (preset_id !== undefined) payload["presetId"] = preset_id;
    
      const res = await waveFetch(`/api/v1/cameras/${camera_id}/control`, {
        method: "POST",
        body: JSON.stringify(payload),
      });
      if (!res.ok) return errorContent(res.status, res.body);
      return textContent(res.body);
    },
  • Zod schema defining the input parameters: camera_id, action (enum), pan, tilt, zoom, preset_id.
    {
      camera_id: z.string().uuid().describe("The camera ID"),
      action: z
        .enum(["move", "zoom", "focus", "recall_preset", "store_preset"])
        .describe("Camera control action"),
      pan: z.number().min(-1).max(1).optional().describe("Pan speed (-1 to 1)"),
      tilt: z.number().min(-1).max(1).optional().describe("Tilt speed (-1 to 1)"),
      zoom: z.number().min(-1).max(1).optional().describe("Zoom speed (-1 to 1)"),
      preset_id: z.string().optional().describe("Preset ID for recall/store"),
    },
  • waveFetch helper function used by the handler to make authenticated HTTP requests.
    async function waveFetch(
      path: string,
      init?: RequestInit,
    ): Promise<{ ok: boolean; status: number; body: string }> {
      const url = `${getBaseUrl()}${path}`;
      const res = await fetch(url, {
        ...init,
        headers: {
          ...getAuthHeaders(),
          ...init?.headers,
        },
      });
      const body = await res.text();
      return { ok: res.ok, status: res.status, body };
    }
  • src/server.ts:24-24 (registration)
    Registration call in the main server entry point that wires up the production tools.
    registerProductionTools(server);
Behavior2/5

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

With no annotations, the description should disclose behavioral traits (e.g., continuous movement, side effects). It only lists actions without explaining behavior like speed ranges or that 'move' combines pan/tilt, leaving important gaps.

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

Conciseness4/5

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

The description is a single, clear sentence that front-loads purpose. It is concise but could briefly mention parameter usage without becoming verbose.

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 tool with 6 parameters and no output schema, the description is too brief. It omits return behavior, side effects, and parameter relationships, making it incomplete for an agent to fully understand the tool's operation.

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?

Schema coverage is 100%, so baseline is 3. The description lists actions already in the enum but adds no new meaning beyond the schema, such as explaining that pan/tilt are continuous speed values.

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

Purpose5/5

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

The description clearly states the tool's purpose: controlling a PTZ camera with specific actions (pan, tilt, zoom, focus, recall preset). This distinguishes it from sibling tools like wave_switch_camera, which likely handles camera selection rather than control.

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 on when to use this tool over alternatives (e.g., wave_switch_camera). The description does not specify prerequisites or exclusions, leaving the agent to infer usage 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/wave-av/mcp-server'

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