Skip to main content
Glama
mongodb-js

MongoDB MCP Server

Official
by mongodb-js

atlas-inspect-access-list

Read-only

Check IP and CIDR ranges authorized to access MongoDB Atlas clusters to verify network security settings.

Instructions

Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesAtlas project ID

Implementation Reference

  • The execute method fetches the access list entries from MongoDB Atlas API for the given projectId, processes the results, and returns a formatted response or a message if none found.
    protected async execute({ projectId }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
        const accessList = await this.session.apiClient.listAccessListEntries({
            params: {
                path: {
                    groupId: projectId,
                },
            },
        });
    
        const results = accessList.results ?? [];
    
        if (!results.length) {
            return {
                content: [{ type: "text", text: "No access list entries found." }],
            };
        }
    
        const entries = results.map((entry) => ({
            ipAddress: entry.ipAddress,
            cidrBlock: entry.cidrBlock,
            comment: entry.comment,
        }));
    
        return {
            content: formatUntrustedData(`Found ${results.length} access list entries`, JSON.stringify(entries)),
        };
    }
  • Defines the input schema for the tool, requiring a projectId using AtlasArgs.projectId().
    export const InspectAccessListArgs = {
        projectId: AtlasArgs.projectId().describe("Atlas project ID"),
    };
    
    export class InspectAccessListTool extends AtlasToolBase {
        public name = "atlas-inspect-access-list";
        protected description = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
        static operationType: OperationType = "read";
        protected argsShape = {
            ...InspectAccessListArgs,
        };
  • The InspectAccessListTool class definition, including name, description, operationType, argsShape, and execute method, which is instantiated and registered via the AllTools array in src/tools/index.ts.
    export class InspectAccessListTool extends AtlasToolBase {
        public name = "atlas-inspect-access-list";
        protected description = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
        static operationType: OperationType = "read";
        protected argsShape = {
            ...InspectAccessListArgs,
        };
    
        protected async execute({ projectId }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
            const accessList = await this.session.apiClient.listAccessListEntries({
                params: {
                    path: {
                        groupId: projectId,
                    },
                },
            });
    
            const results = accessList.results ?? [];
    
            if (!results.length) {
                return {
                    content: [{ type: "text", text: "No access list entries found." }],
                };
            }
    
            const entries = results.map((entry) => ({
                ipAddress: entry.ipAddress,
                cidrBlock: entry.cidrBlock,
                comment: entry.comment,
            }));
    
            return {
                content: formatUntrustedData(`Found ${results.length} access list entries`, JSON.stringify(entries)),
            };
        }
    }
  • Re-exports the InspectAccessListTool for inclusion in the atlas tools namespace and subsequently in AllTools.
    export { InspectAccessListTool } from "./read/inspectAccessList.js";
  • Collects all tools, including AtlasTools (which includes InspectAccessListTool), into AllTools array passed to the server for instantiation and registration.
    export const AllTools: ToolClass[] = Object.values({
        ...MongoDbTools,
        ...AtlasTools,
        ...AtlasLocalTools,
    });
Behavior3/5

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

Annotations indicate read-only and non-destructive operations, which the description doesn't contradict. The description adds context by specifying what is inspected (Ip/CIDR ranges), but doesn't provide additional behavioral details like output format, pagination, or rate limits. With annotations covering safety, this is adequate but minimal.

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 single, direct sentence that efficiently conveys the core function without unnecessary words. It's front-loaded with the key action and resource, making it easy to parse quickly.

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 tool with one parameter, full schema coverage, and annotations indicating safe read operations, the description is minimally complete. However, without an output schema, it doesn't explain what the inspection returns (e.g., list of ranges, details), leaving a gap in understanding the tool's full context.

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 input schema has 100% description coverage, with 'projectId' clearly documented. The description doesn't add any parameter-specific information beyond what the schema provides, such as examples or constraints. Since schema coverage is high, a baseline score of 3 is appropriate.

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?

The description clearly states the action ('Inspect') and resource ('Ip/CIDR ranges with access to your MongoDB Atlas clusters'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'atlas-list-clusters' or 'atlas-inspect-cluster', which might have overlapping contexts but different focuses.

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?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't specify if this is for security audits, troubleshooting, or how it differs from other 'atlas-inspect-' or 'atlas-list-' tools, leaving the agent to infer usage from the name alone.

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/mongodb-js/mongodb-mcp-server'

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