Skip to main content
Glama
Firenook

Firenook

Official

rules_evaluate

Evaluate Firestore or Storage security rules for a proposed get, list, write, or delete request; return allow/deny verdict, deciding rule line, and expression values without writing data.

Instructions

Ask the rules in force (or a draft) whether a request would be allowed: get, list, create, update or delete on a Firestore path or Storage object as a given user or unauthenticated; returns the verdict, the rule line that decided it and each evaluated expression's value. Nothing is written.

Input Schema

NameRequiredDescriptionDefault
uidNoAct as this signed-in user; omit for an unauthenticated request
dataNoFirestore create/update: the written fields as plain JSON (update: the fields set over the existing document)
pathYesFirestore document path (a collection path for list), or the Storage object name (a folder ending in / for list)
timeNorequest.time as RFC 3339; default now
limitNoFirestore list: the query limit
whereNoFilters combined with AND
bucketNoStorage bucket; default the default bucket
claimsNorequest.auth.token: custom claims and token fields (email, firebase.sign_in_provider...)
methodYesThe operation
objectNoStorage create/update: the proposed object
sourceNoEvaluate this draft rules source instead of the rules in force
idTokenNoAct as the user of this emulator ID token (from auth_mint_token) instead of uid/claims
orderByNoSort keys
serviceNoWhich rules: firestore (default) or storage
databaseNoFirestore database id; default (default)
existingNoFirestore: the document before the request as plain JSON, or null for none; default the stored document
collectionGroupNoFirestore list: a collection-group query on the path's last collection id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does well to declare 'Nothing is written' and to name the return payload (verdict, deciding rule line, evaluated expressions), but it never says what happens on a compile error, whether an emulator must be running, or how draft evaluation differs in cost or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that opens with the purpose and closes with the safety clause and return shape. It is dense with semicolons but every clause carries information; minor cost is that enumerating all five methods makes it slightly harder to scan.

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 17-parameter tool with no output schema and no annotations, the description covers the essential gaps: what is simulated, that nothing is persisted, and what comes back. Remaining omissions are error behavior and any prerequisite about the emulator being active.

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?

Schema description coverage is 100% across all 17 parameters, so the schema already documents uid, source, existing, object and the rest. The description only gestures at the uid/claims/idToken axis ('as a given user or unauthenticated') and the source/draft axis; it adds little beyond what the schema states.

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?

States a specific verb and resource: evaluate rules in force or a draft against a hypothetical request, enumerating the five methods and the Firestore/Storage targets. That framing separates it cleanly from siblings like rules_get (fetch source) and rules_list_denials (post-hoc denials).

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 conditional 'whether a request would be allowed' plus 'in force (or a draft)' makes the use case clear, and 'Nothing is written' signals it is a dry-run rather than an actual operation. It stops short of naming alternatives, e.g. pointing at rules_get when the goal is to read the rules text rather than evaluate them.

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