Skip to main content
Glama
Firenook

Firenook

Official

functions_invoke

Destructive

Invoke a loaded Firebase function with an HTTPS/callable request or background event payload, running its code and side effects for emulator testing.

Instructions

Invoke a loaded function: an HTTPS/callable request with data, or with eventData a background event (Firestore before/after, Storage object, Pub/Sub message, Auth user, schedule, Eventarc custom event, task queue payload) shaped as the official functions shell sends it. The function's own code runs, side effects included; to repeat a recorded call exactly, use functions_replay_call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "functions_invoke"
  }
}

Input Schema

NameRequiredDescriptionDefault
authNo{"uid","token"} or {"admin":true} for first-generation events
dataNoCallable payload (sent as {"data": ...})
nameYesFunction name
methodNoHTTP method for plain HTTPS functions; default POST
paramsNoWildcard values for the trigger pattern
regionNoRegion when the name is deployed in several
resourceNoFirestore document path or the legacy resource name
eventDataNoBackground event payload; its shape depends on the trigger
eventTypeNoOverride the CloudEvent type for Eventarc custom events

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.6/5.0
Behavior4/5

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

The description adds meaningful behavior beyond annotations by warning that 'The function's own code runs, side effects included,' which reinforces the destructiveHint annotation and tells the agent that arbitrary function behavior will execute. It also explains that event payloads are shaped as the official functions shell sends them. It does not discuss permissions, rate limits, or return behavior, so it falls short of a 5 despite being strong.

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 front-loaded with the core action, then expands into the callable/background distinction before routing to the alternative tool. It is dense but every clause contributes useful selection or invocation context, with no filler.

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 complex nine-parameter mutation tool with no output schema, the description covers the key invocation modes, side effects, and the replay alternative. It leaves return behavior and permission requirements implicit, which are minor gaps given the rich schema and annotations.

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?

Schema coverage is 100%, so the schema already documents all nine parameters, and the description adds useful semantic separation between 'data' for callable payloads and 'eventData' for background events. It also enumerates the kinds of background events, which helps an agent pick the right payload mode. It does not add meaning for method, params, region, or eventType beyond the schema.

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 and resource: 'Invoke a loaded function,' and immediately distinguishes the two invocation modes, HTTPS/callable with data versus background events with eventData. It also names the sibling tool for exact recorded-call replay, so an agent can separate this from functions_replay_call without inspecting schemas.

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?

It gives explicit routing guidance by saying to use functions_replay_call 'to repeat a recorded call exactly,' which defines when this tool is the wrong choice. That alternative, combined with the normal invocation purpose, is enough for an agent to choose correctly.

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