Skip to main content
Glama

keynote_set_element_position

Move any text, image, or shape element on a Keynote slide to a new position by specifying x and y coordinates in points from the top-left corner.

Instructions

Move an element to a new position on the slide. Coordinates are in points from the top-left corner. Keynote standard slide is 1920×1080 pts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_indexNoDocument index (0-based). Defaults to 0 (frontmost).
slide_indexYesSlide index (0-based).
element_typeYesElement collection to target.
element_indexYesElement index within its collection (0-based).
xYesHorizontal position in points (from left edge).
yYesVertical position in points (from top edge).

Implementation Reference

  • The actual JXA handler that executes 'set_element_position'. It gets the document, slide, and element, then sets the element's position. It verifies the change and returns a helpful error if the element is a locked master-layout placeholder.
    case 'set_element_position': {
      var doc = getDoc(app, payload.doc_index);
      var el  = getElement(getSlide(doc, payload.slide_index), payload.element_type, payload.element_index);
      try {
        el.position = [payload.x, payload.y];
        // Verify it actually changed
        var verify = safeCall(function() { return el.position(); }, null);
        if (verify && Math.abs(verify[0] - payload.x) < 2 && Math.abs(verify[1] - payload.y) < 2) {
          return { updated: true, position: { x: payload.x, y: payload.y } };
        }
        return {
          updated: false,
          locked: true,
          reason: 'This element is a layout placeholder controlled by the master slide. Its position cannot be changed via scripting. To move it: open Keynote, edit the master slide (View > Edit Master Slides), or duplicate the slide and add a free text box instead.'
        };
      } catch (e) {
        throw new Error('Cannot move this element — it is likely a master-layout placeholder. ' + (e.message || ''));
      }
    }
  • The tool definition with input schema for 'keynote_set_element_position'. Defines required parameters: slide_index, element_type, element_index, x, y. Also optional doc_index.
    {
      name: 'keynote_set_element_position',
      description: 'Move an element to a new position on the slide. Coordinates are in points from the top-left corner. Keynote standard slide is 1920×1080 pts.',
      inputSchema: {
        type: 'object',
        properties: {
          doc_index:     ELEMENT_FIELDS.doc_index,
          slide_index:   ELEMENT_FIELDS.slide_index,
          element_type:  ELEMENT_FIELDS.element_type,
          element_index: ELEMENT_FIELDS.element_index,
          x:             { type: 'number', description: 'Horizontal position in points (from left edge).' },
          y:             { type: 'number', description: 'Vertical position in points (from top edge).' },
        },
        required: ['slide_index', 'element_type', 'element_index', 'x', 'y'],
      },
    },
  • src/index.ts:167-177 (registration)
    The MCP tool registration/dispatch in the main server file. Maps 'keynote_set_element_position' to bridge.execute('set_element_position', ...) with argument extraction.
    case 'keynote_set_element_position': {
      const result = await bridge.execute('set_element_position', {
        doc_index:     optionalNumber(args.doc_index),
        slide_index:   requireNumber(args.slide_index, 'slide_index'),
        element_type:  requireString(args.element_type, 'element_type'),
        element_index: requireNumber(args.element_index, 'element_index'),
        x:             requireNumber(args.x, 'x'),
        y:             requireNumber(args.y, 'y'),
      });
      return jsonResult(result);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'Move an element to a new position,' which implies a destructive mutation (changing state). However, it does not disclose whether the change is reversible, requires authentication, or has any side effects on other elements. The coordinate system details are helpful but insufficient for behavioral transparency.

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 two sentences, front-loaded with the primary action, and contains no filler. Every word adds essential meaning: the action, coordinate units, and slide dimensions are all directly useful for correct invocation.

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?

The tool has 6 parameters and no output schema, yet the description does not explain what the tool returns (e.g., success indicator) or mention preconditions like the element must exist. While the coordinate information is good, the description is incomplete for an agent to understand the full context of invocation and results.

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 description coverage is 100%, so baseline is 3. The description adds value by clarifying the coordinate system (points from top-left) and standard slide size, which aids understanding of 'x' and 'y' parameters. However, it does not provide extra meaning beyond what the schema already offers for each parameter.

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 moves an element to a new position, specifying the coordinate system as points from the top-left and the standard slide dimensions (1920x1080). This verb-resource combination ('Move an element') is specific and distinguishes it from sibling tools like 'keynote_set_element_size' which handles resizing.

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 gives no guidance on when to use this tool versus alternatives. Sibling tools like 'keynote_set_element_size' or 'keynote_set_element_fill_color' perform different modifications, but the description does not explicitly say 'use this for repositioning, not for other adjustments.' No when-not-to-use or prerequisites are mentioned.

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/tszaks/keynote-mcp'

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