Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

close-browser

Close a specific AdsPower browser profile by providing its user ID, enabling automated browser management through the LocalAPI MCP server.

Instructions

Close the browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesThe browser id of the browser to stop, it is required when you want to stop the browser

Implementation Reference

  • The handler function closeBrowser that sends an axios GET request to the CLOSE_BROWSER API endpoint with the userId parameter and returns a success message.
    async closeBrowser({ userId }: CloseBrowserParams) {
        const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.CLOSE_BROWSER}`, {
            params: { user_id: userId }
        });
        return 'Browser closed successfully';
    },
  • Zod schema defining the input for close-browser tool: requires a 'userId' string parameter.
    closeBrowserSchema: z.object({
        userId: z.string().describe('The browser id of the browser to stop, it is required when you want to stop the browser')
    }).strict(),
  • Registers the 'close-browser' tool on the MCP server using the closeBrowserSchema and wrapped browserHandlers.closeBrowser function.
    server.tool('close-browser', 'Close the browser', schemas.closeBrowserSchema.shape,
        wrapHandler(browserHandlers.closeBrowser));
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't disclose whether closing is reversible, if it requires specific permissions, what happens to open pages or data, or any side effects like session termination. This leaves critical behavioral traits unaddressed for a mutation 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 'Close the browser' is extremely concise—three words that directly convey the core action. It's front-loaded with no unnecessary elaboration, making it efficient for quick understanding without wasting space.

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

Completeness2/5

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

Given the tool's complexity (a mutation action with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'close' means in practice, potential outcomes, or error conditions, leaving gaps that could hinder correct agent invocation in a browser management 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 'userId' documented as 'The browser id of the browser to stop, it is required when you want to stop the browser'. The description adds no parameter semantics beyond this, as it doesn't mention parameters at all. Baseline score of 3 is appropriate since the schema fully covers the single parameter.

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

Purpose3/5

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

The description 'Close the browser' clearly states the action (close) and resource (browser), but it's vague about scope—it doesn't specify whether this closes a specific browser instance or all browsers. It distinguishes from siblings like 'delete-browser' (which likely removes it permanently) and 'open-browser', but lacks precision on what 'close' entails operationally.

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 guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this should be used after completing tasks versus 'delete-browser' for cleanup, or if it's for stopping a specific browser session. The description alone offers no context for selection among sibling tools like 'get-browser-list' or 'update-browser'.

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/AdsPower/local-api-mcp-typescript'

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