keynote_list_presentations
List all currently open Keynote presentations with their index, name, slide count, and file path.
Instructions
List all currently open Keynote presentations. Returns index, name, slide count, and file path for each.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/keynote-jxa.ts:240-254 (handler)JXA handler for 'list_presentations' operation: iterates open Keynote documents and returns index, name, slideCount, modified, and filePath for each.
case 'list_presentations': { var count = safeCall(function() { return app.documents.length; }, 0); var result = []; for (var i = 0; i < count; i++) { var d = app.documents[i]; result.push({ index: i, name: safeCall(function() { return d.name(); }, 'Untitled'), slideCount: safeCall(function() { return d.slides.length; }, 0), modified: safeCall(function() { return d.modified(); }, false), filePath: safeCall(function() { return d.file.posixPath(); }, '') }); } return result; } - src/index.ts:90-93 (registration)MCP handler routing: case 'keynote_list_presentations' calls bridge.execute('list_presentations', {}) and returns JSON result.
case 'keynote_list_presentations': { const result = await bridge.execute('list_presentations', {}); return jsonResult(result); } - src/keynote-tooling.ts:26-30 (schema)Tool definition with name 'keynote_list_presentations', description, and empty inputSchema (no params required).
{ name: 'keynote_list_presentations', description: 'List all currently open Keynote presentations. Returns index, name, slide count, and file path for each.', inputSchema: { type: 'object', properties: {}, additionalProperties: false }, }, - src/index.ts:58-70 (helper)KeynoteBridge.execute() method that spawns osascript with KEYNOTE_OPERATION='list_presentations' and parses the JXA envelope result.
throw new Error(`'${field}' values must be numbers`); } return [r, g, b]; } function optionalColor(value: unknown): [number, number, number] | undefined { if (!value) return undefined; if (!Array.isArray(value) || value.length !== 3) return undefined; return value as [number, number, number]; } // ── Server ────────────────────────────────────────────────────────────────────