Skip to main content
Glama
m0rvayne

mcp-osascript

get_frontmost_app

Retrieves the name and bundle ID of the active application, allowing scripts to adapt to the current app.

Instructions

Get the name and bundle ID of the frontmost (active) application. May require Automation permission for System Events in System Settings > Privacy & Security > Automation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.3

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It usefully discloses the potential Automation permission requirement for System Events and clarifies what the tool returns. It does not describe failure behavior or whether it may trigger a permission prompt, but for a simple read-only lookup the disclosure is adequate.

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, front-loaded sentence that directly states what the tool does, then adds a necessary permission caveat. Every part is informative, and there is no redundant or filler text.

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?

For a zero-parameter, read-only tool with no output schema, the description is largely complete: it names the resource, the returned fields, and a relevant prerequisite. It could mention what happens if permission is denied, but that is a minor gap given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline for this dimension is 4. The description correctly adds no parameter-related text because there is nothing to explain; the empty schema is already complete.

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 states a specific verb ('Get'), a specific resource ('frontmost (active) application'), and the exact return values ('name and bundle ID'). This clearly distinguishes it from siblings like open_app, get_browser_tabs, or app_menu.

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?

The intended use case is implied by the tool's name and description: call it when you need to identify the active application. However, the description does not explicitly say when to prefer this over alternatives, nor does it mention any exclusions or conditions beyond the permission caveat.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.