Skip to main content
Glama

Get Shortcut Detail

get_shortcut_detail
Read-onlyIdempotent

Retrieve details and actions of any Siri Shortcut by name. Get full shortcut structure for analysis or integration.

Instructions

Get details about a Siri Shortcut including its actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesShortcut name (exact match)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
shortcutYes
detailYes

Implementation Reference

  • The tool registration and handler for 'get_shortcut_detail'. Calls getShortcutDetailScript(name) via JXA and returns the result structured with an okStructured response.
    server.registerTool(
      "get_shortcut_detail",
      {
        title: "Get Shortcut Detail",
        description: "Get details about a Siri Shortcut including its actions.",
        inputSchema: {
          name: z.string().max(500).describe("Shortcut name (exact match)"),
        },
        outputSchema: {
          shortcut: z.string(),
          detail: z.string(),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async ({ name }) => {
        try {
          return okStructured(await runJxa<ShortcutsDetail>(getShortcutDetailScript(name)));
        } catch (e) {
          return errJxaFor("get shortcut detail", e);
        }
      },
    );
  • The JXA script generator function getShortcutDetailScript that builds a macOS JavaScript for Automation script. It runs 'shortcuts view <name>' via shell to retrieve shortcut details, falling back to 'Details not available' on error.
    export function getShortcutDetailScript(name: string): string {
      return `
        const app = Application.currentApplication();
        app.includeStandardAdditions = true;
        let actions = '';
        try {
          actions = app.doShellScript('shortcuts view "${escJxaShell(name)}" 2>&1 || true');
        } catch(e) {
          actions = 'Details not available';
        }
        JSON.stringify({shortcut: '${esc(name)}', detail: actions});
      `;
    }
  • The ShortcutsDetail interface defining the return shape: { shortcut: string, detail: string }.
    export interface ShortcutsDetail {
      shortcut: string;
      detail: string;
    }
  • The input/output schema for get_shortcut_detail: input is a 'name' string (max 500 chars), output has 'shortcut' and 'detail' as strings.
    {
      title: "Get Shortcut Detail",
      description: "Get details about a Siri Shortcut including its actions.",
      inputSchema: {
        name: z.string().max(500).describe("Shortcut name (exact match)"),
      },
      outputSchema: {
        shortcut: z.string(),
        detail: z.string(),
      },
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
  • Example fixture for the ShortcutsDetail shape used in contract tests.
    export const GET_SHORTCUT_DETAIL_EXAMPLE: ShortcutsDetail = {
      shortcut: "Daily Brief",
      detail: "Actions: Get Current Weather, Get Today's Calendar Events, Combine Text, Create Note",
    };
Behavior3/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false. Description adds that it includes actions, which is a mild behavioral insight. No contradiction.

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?

Single sentence, concise, front-loaded with key information. No unnecessary words.

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

Completeness4/5

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

With output schema present, good annotations, and simple single-parameter input, description adequately covers tool behavior. Minor gap: no usage context for when to use over siblings.

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?

Single parameter 'name' is fully described in schema (exact match, max length). Description does not add additional meaning beyond schema coverage of 100%.

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?

Description clearly states verb 'Get details about a Siri Shortcut' and specifies output includes 'its actions'. Distinguishes from sibling tools like list_shortcuts and run_shortcut.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives like list_shortcuts. Usage is implied for retrieving detailed info on a specific shortcut by exact name.

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/heznpc/AirMCP'

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