Skip to main content
Glama
fastmcp-me

gcp-mcp

by fastmcp-me

create_firewall_rule

Create a firewall rule in GCP to allow or deny network traffic by configuring direction, protocols, ports, IP ranges, and tags.

Instructions

    Create a firewall rule in a GCP project.
    
    Args:
        project_id: The ID of the GCP project
        name: The name of the firewall rule
        network: The name of the network to create the firewall rule for
        direction: The direction of traffic to match ('INGRESS' or 'EGRESS')
        priority: The priority of the rule (lower number = higher priority, 0-65535)
        source_ranges: Optional list of source IP ranges (for INGRESS)
        destination_ranges: Optional list of destination IP ranges (for EGRESS)
        allowed_protocols: Optional list of allowed protocols, e.g. [{"IPProtocol": "tcp", "ports": ["80", "443"]}]
        denied_protocols: Optional list of denied protocols, e.g. [{"IPProtocol": "tcp", "ports": ["22"]}]
        target_tags: Optional list of target instance tags
        source_tags: Optional list of source instance tags (for INGRESS)
        description: Optional description for the firewall rule
    
    Returns:
        Result of the firewall rule creation
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
networkYes
priorityYes
directionYes
project_idYes
descriptionNo
source_tagsNo
target_tagsNo
source_rangesNo
denied_protocolsNo
allowed_protocolsNo
destination_rangesNo
Behavior2/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 states the creation action but does not mention side effects, idempotency, reversal, or response structure. The Returns line is vague ('Result of the firewall rule creation'), offering no insight into failure modes or what the returned object contains. This is a significant gap for a mutating tool.

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 well-structured docstring with a clear one-sentence summary, then Args, and Returns. Though lengthy to cover 12 parameters, every line adds necessary information. There is no fluff or repetition, and the most critical information (action and required parameters) is front-loaded.

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?

Given the tool's complexity (12 parameters, 5 required, no output schema), the description covers all parameters with valuable context, including direction-dependent behavior and protocol format examples. However, it omits edge cases like whether allowed and denied protocols are mutually exclusive, and the return value is described only vaguely. Overall, it is nearly complete for invocation but lacks some operational detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description is the sole source of parameter meaning. It compensates thoroughly: each parameter is described with type constraints (e.g., direction values 'INGRESS'/'EGRESS'), value ranges (priority 0-65535, lower=higher), conditional relevance (source_ranges for INGRESS, destination_ranges for EGRESS), and concrete examples for allowed_protocols and denied_protocols. This adds substantial meaning beyond the bare schema types.

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 opens with 'Create a firewall rule in a GCP project,' which clearly states a specific verb and resource. It distinguishes itself from sibling tools like list_firewall_rules by indicating a create action, and there are no other create-firewall-rule siblings, so its purpose is unambiguous.

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

Usage Guidelines3/5

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

The description implies usage by the verb 'create' but does not explicitly state when to use this tool versus alternatives (e.g., list_firewall_rules for inspecting existing rules). It also lacks guidance on preconditions like network existence or IAM permissions. Thus, usage context is only implied, not explicitly articulated.

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/fastmcp-me/gcp-mcp-henihaddad'

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