Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

list_apps

List and filter Heroku applications by ownership, collaboration, team, or private space. View app names, regions, and ownership details in JSON or text format for easy management.

Instructions

List Heroku applications with flexible filtering options. Use this tool when you need to: 1) Show all apps owned by the user, 2) Show apps where the user is a collaborator (use all=true), 3) Filter apps by team or private space. Note: For checking app name availability, prefer using get_app_info as it returns a more focused dataset. The response includes app names, regions, and ownership information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoWhen true, displays a comprehensive list including: (1) apps owned by the user and (2) apps where the user is a collaborator through direct access or team membership. When false or omitted, shows only owned apps.
jsonNoControls the output format. When true, returns a detailed JSON response containing app metadata such as generation, buildpacks, owner information, and region. When false or omitted, returns a simplified text format.
personalNoForces the tool to list applications from your personal account, even when you have a default team configured. When true, overrides any default team setting and shows only apps owned by your personal account. This is particularly useful when you work with multiple teams but need to specifically view your personal apps. When false or omitted, follows the default behavior of using the default team if one is set.
spaceNoFilters the results to show only apps within a specific private space. Provide the private space name to filter. This parameter is mutually exclusive with the team parameter.
teamNoFilters the results to show only apps belonging to a specific team. Provide the team name to filter. This parameter is mutually exclusive with the space parameter.

Implementation Reference

  • The handler function for the 'list_apps' tool. It constructs a Heroku CLI 'apps' command using CommandBuilder with provided options (all, personal, space, team), executes it via herokuRepl, and processes the output with handleCliOutput.
    async (options: ListAppsOptions): Promise<McpToolResponse> => {
      const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_APPS)
        .addFlags({
          all: options.all,
          personal: options.personal,
          space: options.space,
          team: options.team
        })
        .build();
    
      const output = await herokuRepl.executeCommand(command);
      return handleCliOutput(output);
    }
  • Zod schema defining the input parameters for the list_apps tool: optional flags for filtering apps by ownership, personal/team, space, or team.
    export const listAppsOptionsSchema = z.object({
      all: z.boolean().optional().describe('Show owned apps and collaborator access. Default: owned only'),
      personal: z.boolean().optional().describe('List personal account apps only, ignoring default team'),
      space: z.string().optional().describe('Filter by private space name. Excludes team param'),
      team: z.string().optional().describe('Filter by team name. Excludes space param')
    });
  • The registerListAppsTool function that registers the 'list_apps' tool on the MCP server, providing name, description, schema, and handler.
    export const registerListAppsTool = (server: McpServer, herokuRepl: HerokuREPL): void => {
      server.tool(
        'list_apps',
        'List Heroku apps: owned, collaborator access, team/space filtering',
        listAppsOptionsSchema.shape,
        async (options: ListAppsOptions): Promise<McpToolResponse> => {
          const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_APPS)
            .addFlags({
              all: options.all,
              personal: options.personal,
              space: options.space,
              team: options.team
            })
            .build();
    
          const output = await herokuRepl.executeCommand(command);
          return handleCliOutput(output);
        }
      );
    };
  • src/index.ts:50-50 (registration)
    Invocation of registerListAppsTool in the main index.ts to register the list_apps tool during server setup.
    apps.registerListAppsTool(server, herokuRepl);
  • TOOL_COMMAND_MAP constant mapping LIST_APPS to the Heroku CLI command 'apps', used by the handler.
    LIST_APPS: 'apps',
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing what the response includes ('app names, regions, and ownership information'), but doesn't mention pagination behavior, rate limits, authentication requirements, or error conditions. For a list tool with no annotations, this is good but not comprehensive.

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 well-structured and front-loaded with the core purpose, followed by specific usage scenarios and an alternative recommendation. Every sentence adds value, with no wasted words or redundant information. The three bullet-like scenarios are particularly effective.

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 list tool with no annotations and no output schema, the description does well by explaining what the response includes. However, it could be more complete by mentioning pagination behavior (if applicable) or typical response structure. Given the 5 parameters and lack of structured output documentation, it's good but not fully comprehensive.

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 schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description mentions 'flexible filtering options' which aligns with the schema, but doesn't add significant semantic value beyond what's already in the parameter descriptions. This meets the baseline for high schema coverage.

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 with a specific verb ('List') and resource ('Heroku applications'), and distinguishes it from sibling tools by mentioning 'flexible filtering options' and explicitly contrasting with get_app_info for checking app name availability. This provides clear differentiation from other tools in the server.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines with three numbered scenarios for when to use this tool, plus a clear alternative ('prefer using get_app_info as it returns a more focused dataset'). This gives the agent specific guidance on when to choose this tool versus alternatives.

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

Related 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/heroku/heroku-mcp-server'

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