Skip to main content
Glama

list_profiles

Retrieve all iTerm2 profiles, including their names and GUIDs, to manage terminal configurations.

Instructions

List all iTerm2 profiles with their names and GUIDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that executes the list_profiles tool logic. It queries all iTerm2 profiles via PartialProfile.async_query and returns their names and GUIDs as a newline-separated string.
    @mcp.tool()
    async def list_profiles() -> str:
        """List all iTerm2 profiles with their names and GUIDs."""
        conn = await _connection_singleton()
        profiles = await iterm2.PartialProfile.async_query(conn)
        lines = [f"{p.name}  [{p.guid}]" for p in profiles]
        return "\n".join(lines) if lines else "(no profiles)"
  • The tool is registered via the @mcp.tool() decorator on the list_profiles async function. This registers it with the FastMCP server instance.
    @mcp.tool()
  • The _connection_singleton helper that creates/reuses the shared iTerm2 connection, used internally by list_profiles.
    async def _connection_singleton() -> iterm2.Connection:
        """Return the shared iTerm2 connection, creating it on first use."""
        global _connection
        async with _conn_lock:
            if _connection is None:
                _connection = await iterm2.Connection.async_create()
            return _connection
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states what the tool lists, without mentioning side effects, permissions, or read-only nature. While listing is inherently read-only, the description does not confirm this or other behavioral traits.

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 with no wasted words. It clearly and efficiently conveys the tool's purpose.

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

Completeness5/5

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

Given the tool's simplicity (0 parameters, no nested objects) and the presence of an output schema, the description is complete enough. It tells the agent what the tool does without needing further elaboration.

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?

The input schema has no parameters and 100% schema description coverage, so the description adds no parameter information. Baseline is 3, and the description does not need to add value beyond the schema here.

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: 'List all iTerm2 profiles with their names and GUIDs.' It uses a specific verb ('List') and resource ('iTerm2 profiles'), and distinguishes itself from sibling tools like 'list_sessions' or 'close_session' by focusing on profiles.

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

Usage Guidelines4/5

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

The description implies usage (when you need to see available profiles), but does not explicitly state when to use it versus alternatives. However, given the tool's simplicity and the lack of overlapping functionality among siblings, the context is sufficiently clear.

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/lorencarvalho/iterm2-mcp'

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