Skip to main content
Glama
NigelThorne

Firebase MCP Server

by NigelThorne

list_functions

View all Cloud Functions registered in the Firebase Emulator to monitor and manage serverless operations during development.

Instructions

List all Cloud Functions registered in the emulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleListFunctions function implementation which fetches functions from the Firebase emulator or falls back to log analysis.
    async function handleListFunctions() {
      try {
        const response = await fetch(`http://${FIREBASE_EMULATOR_HUB}/emulators`);
        if (!response.ok) return [];
        const data = await response.json();
        const functionsEmulator = data.functions;
        if (!functionsEmulator) return [];
    
        // Try to get function list from emulator
        const functionsUrl = `http://${functionsEmulator.host || 'localhost'}:${functionsEmulator.port}/__/functions/list`;
        const fnResponse = await fetch(functionsUrl);
        if (fnResponse.ok) {
          const fnData = await fnResponse.json();
          return (fnData.functions || []).map((fn: any) => ({
            name: fn.name || fn.id,
            trigger: fn.trigger?.httpsTrigger ? "https" : fn.trigger?.eventTrigger?.eventType || "unknown",
            region: fn.region || "us-central1",
          }));
        }
    
        // Fallback: extract unique function names from logs
        const uniqueFunctions = [...new Set(logBuffer.map(l => l.function).filter(Boolean))];
        return uniqueFunctions.map(name => ({ name, trigger: "unknown", region: "unknown" }));
      } catch {
        return [];
      }
    }
  • src/index.ts:214-217 (registration)
    Registration of the list_functions tool in the tools array.
      name: "list_functions",
      description: "List all Cloud Functions registered in the emulator",
      inputSchema: { type: "object" as const, properties: {} },
    },
  • Tool request handler for list_functions.
    case "list_functions":
      result = await handleListFunctions();
      break;
Behavior3/5

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

No annotations provided, so description carries full burden. It valuably discloses the 'emulator' context (indicating local development, not production GCP), but omits return format, pagination behavior, and whether it includes all function types (HTTP, callable, triggers).

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?

Nine words, single sentence. Front-loaded with action verb. Zero redundancy or waste.

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

Completeness3/5

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

For a zero-parameter list tool, the description is minimally sufficient but lacks output value description (names, URLs, triggers?) given no output schema exists. The 'emulator' context partially compensates.

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?

Input schema has zero parameters. Per scoring rules, baseline is 4 for tools with no parameters; the description appropriately implies no filtering is needed/possible.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb ('List') + resource ('Cloud Functions') + scope ('emulator'). However, it does not explicitly differentiate from sibling 'get_function_logs' (which retrieves logs for specific functions) even though the distinction is implied by the verbs.

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

Usage Guidelines2/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 versus alternatives like 'get_function_logs' (which requires knowing a function name first) or when to prefer this over other listing operations.

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/NigelThorne/firebase_mcp_server'

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