Skip to main content
Glama
gologinapp

GoLogin MCP

Official
by gologinapp

put_profile__id__custom

Modify specific settings of a browser profile including name, notes, language, proxy, and geolocation configurations to customize browsing behavior and manage preferences efficiently.

Instructions

Update profile with partial parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audioContextNoAudioContext is a configuration component that controls how Chromium handles the Web Audio API.
autoLangNoIf true, the browser will automatically change the language to the language of your location or proxy location if proxy is enabled.
bookmarksNoBookmarks of the browser that will be created.
canvasNoCanvas is a browser feature that utilizes the HTML5 Canvas API for rendering 2D and 3D graphics in web browsers.
chromeExtensionsNoList of Chrome extensions to be installed in the browser profile.
clientRectsNoControls whether the client rectangle values are randomized.
devicePixelRatioNoParameter of mobile devices, tablets and notebooks. If you not sure what to put - leave it empty.
dnsNoAllows you to specify custom DNS (Domain Name System) settings for the browser profile.
folderNameNo
foldersNoList of folder identifiers associated with this browser profile for organization.
fontsNoFonts are a configuration component that controls how Chromium handles the Fonts API.
geolocationNoGeolocation in the browser is a feature that allows websites to access the user's geographical location.
idYes
lockEnabledNoIf enabled - other users will not be able to run this profile when its already running.
mediaDevicesNoA feature that provides access to connected media input and output devices like cameras, microphones, and speakers.
nameNoProfile name.
navigatorNo
notesNoHere you can put some information about the profile that wil help you to navigate.
osNoOS type. It should be the same with the OS you want to run the browser on.
osSpecNoHere you can specify OS specification. For example chip version for macos or version of windows.
proxyNo
timezoneNoThe timezone configuration is a setting that controls how the browser handles time and date information.
userChromeExtensionsNoList of custom Chrome extensions to be installed in the browser profile.
webGLNoWebGL (Web Graphics Library) is a JavaScript API in Chromium-based browsers that allows websites to render interactive 2D and 3D graphics without requiring plugins. It provides direct access to the computer's GPU(Graphics Processing Unit) for accelerated rendering.
webGLMetadataNoControls WebGL metadata such as vendor and renderer information.
webRTCNoWebRTC in browser configuration refers to settings that control how the browser handles real-time communication protocols.
workspaceIdNo

Implementation Reference

  • The dynamic handler that implements all generated tools, including 'put_profile__id__custom'. It matches the tool name to an OpenAPI operation using the specific name generation logic (with 'browser' to 'profile' replacement and path normalization), constructs the request parameters, and performs the HTTP PUT request to the corresponding GoLogin API endpoint.
    private async callDynamicTool(
      toolName: string,
      parameters: CallParameters = {},
      headers: Record<string, string> = {}
    ): Promise<CallToolResult> {
      console.log('parameters', parameters.body);
      if (!this.apiSpec || !this.apiSpec.paths) {
        throw new Error('API specification not loaded');
      }
    
      let targetPath = '';
      let targetMethod = '';
      let operation: OpenAPIV3.OperationObject | undefined;
    
      for (const [path, pathItem] of Object.entries(this.apiSpec.paths)) {
        if (!pathItem) continue;
    
        for (const [method, op] of Object.entries(pathItem)) {
          if (['get', 'post', 'put', 'delete', 'patch', 'head', 'options'].includes(method) && op) {
            const opObj = op as OpenAPIV3.OperationObject;
            const generatedToolName = `${method}${path.replace('browser', 'profile').replace(/[^a-zA-Z0-9]/g, '_')}`;
    
            if (generatedToolName === toolName) {
              targetPath = path;
              targetMethod = method.toUpperCase();
              operation = opObj;
              break;
            }
          }
        }
        if (operation) break;
      }
    
    
      if (!operation) {
        throw new Error(`Tool "${toolName}" not found`);
      }
    
      let url = `${this.baseUrl}${targetPath}`;
      const requestHeaders: Record<string, string> = { ...headers };
      let requestBody: string | undefined;
    
      requestHeaders['User-Agent'] = 'gologin-mcp';
      console.error('this.token', this.token);
      if (this.token) {
        requestHeaders['Authorization'] = `Bearer ${this.token}`;
      }
    
      if (parameters.path) {
        for (const [key, value] of Object.entries(parameters.path)) {
          url = url.replace(`{${key}}`, encodeURIComponent(value));
        }
      }
    
      const queryParams = new URLSearchParams();
      if (parameters.query) {
        for (const [key, value] of Object.entries(parameters.query)) {
          if (value) {
            queryParams.append(key, value);
          }
        }
      }
    
      if (queryParams.toString()) {
        url += `?${queryParams.toString()}`;
      }
      if (parameters.body && ['POST', 'PUT', 'PATCH', 'DELETE'].includes(targetMethod)) {
        requestHeaders['Content-Type'] = 'application/json';
        requestBody = JSON.stringify(parameters.body);
      }
      console.log('requestBody', requestBody);
      try {
        const fetchOptions: RequestInit = {
          method: targetMethod,
          headers: requestHeaders,
        };
        console.error('fetchOptions', fetchOptions);
        if (requestBody) {
          fetchOptions.body = requestBody;
        }
        const response = await fetch(url, fetchOptions);
    
        const responseHeaders: Record<string, string> = {};
        response.headers.forEach((value, key) => {
          responseHeaders[key] = value;
        });
    
        let responseBody: any;
        const contentType = response.headers.get('content-type') || '';
    
    
        if (contentType.includes('application/json')) {
          try {
            responseBody = await response.json();
          } catch {
            responseBody = await response.text();
          }
        } else {
          responseBody = await response.text();
        }
        return {
          content: [
            {
              type: 'text',
              text: `API Call Result:\n` +
                `URL: ${url}\n` +
                `Method: ${targetMethod}\n` +
                `Status: ${response.status} ${response.statusText}\n\n` +
                `Response Headers:\n${JSON.stringify(responseHeaders, null, 2)}\n\n` +
                `Response Body:\n${typeof responseBody === 'object' ? JSON.stringify(responseBody, null, 2) : responseBody}`,
            },
          ],
        };
      } catch (error) {
        throw new Error(`API call failed: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • src/index.ts:47-71 (registration)
    Registers the 'put_profile__id__custom' tool dynamically by generating its name from OpenAPI paths (replacing 'browser' with 'profile' and normalizing slashes to underscores) and listing it in the tools response.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      const tools: Tool[] = [];
      if (this.apiSpec && this.apiSpec.paths) {
        for (const [path, pathItem] of Object.entries(this.apiSpec.paths)) {
          if (!pathItem) continue;
    
          for (const [method, operation] of Object.entries(pathItem)) {
            if (['get', 'post', 'put', 'delete', 'patch', 'head', 'options'].includes(method) && operation) {
              const op = operation as OpenAPIV3.OperationObject;
              const toolName = `${method}${path.replace('browser', 'profile').replace(/[^a-zA-Z0-9]/g, '_')}`;
    
              const inputSchema = this.buildInputSchema(op, path);
    
              tools.push({
                name: toolName,
                description: op.summary || op.description || `${method.toUpperCase()} ${path}`,
                inputSchema,
              });
            }
          }
        }
      }
    
      return { tools };
    });
  • Generates the input schema for the dynamic tool 'put_profile__id__custom' by combining path parameters (e.g., 'id'), query parameters, and request body schema from the corresponding OpenAPI PUT operation.
    private buildInputSchema(operation: OpenAPIV3.OperationObject, path: string): any {
      const properties: any = {};
      const required: string[] = [];
    
      const pathParams = this.extractPathParameters(operation, path);
      const queryParams = this.extractQueryParameters(operation);
      const bodySchema = this.extractRequestBodySchema(operation);
    
      if (pathParams.properties && Object.keys(pathParams.properties).length > 0) {
        for (const [key, prop] of Object.entries(pathParams.properties)) {
          properties[key] = this.convertOpenAPISchemaToJsonSchema(prop as OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject);
          if (pathParams.required.includes(key)) {
            required.push(key);
          }
        }
      }
    
      if (queryParams.properties && Object.keys(queryParams.properties).length > 0) {
        for (const [key, prop] of Object.entries(queryParams.properties)) {
          properties[key] = this.convertOpenAPISchemaToJsonSchema(prop as OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject);
          if (queryParams.required.includes(key)) {
            required.push(key);
          }
        }
      }
    
      if (bodySchema && bodySchema.properties) {
        for (const [key, prop] of Object.entries(bodySchema.properties)) {
          properties[key] = this.convertOpenAPISchemaToJsonSchema(prop as OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject);
          if (bodySchema.required && bodySchema.required.includes(key)) {
            required.push(key);
          }
        }
      }
    
      const schema: any = {
        type: 'object',
        properties,
      };
    
      if (required.length > 0) {
        schema.required = required;
      }
    
      return schema;
    }
  • Helper that parses tool arguments into path/query/body parameters by matching the tool name to OpenAPI operation and mapping args accordingly, crucial for handling 'put_profile__id__custom' inputs.
    private extractParametersFromArgs(toolName: string, args: Record<string, any>): CallParameters {
      if (!this.apiSpec || !this.apiSpec.paths) {
        return { body: args };
      }
    
      let operation: OpenAPIV3.OperationObject | undefined;
      let path = '';
    
      for (const [apiPath, pathItem] of Object.entries(this.apiSpec.paths)) {
        if (!pathItem) continue;
    
        for (const [method, op] of Object.entries(pathItem)) {
          if (['get', 'post', 'put', 'delete', 'patch', 'head', 'options'].includes(method) && op) {
            const opObj = op as OpenAPIV3.OperationObject;
            const generatedToolName = opObj.operationId || `${method}_${apiPath.replace(/[^a-zA-Z0-9]/g, '_')}`;
    
            if (generatedToolName === toolName) {
              operation = opObj;
              path = apiPath;
              break;
            }
          }
        }
        if (operation) break;
      }
    
      if (!operation) {
        return { body: args };
      }
    
      const pathParams: Record<string, string> = {};
      const queryParams: Record<string, string> = {};
      const bodyParams: any = {};
    
      const pathParamNames = path.match(/\{([^}]+)\}/g)?.map(p => p.slice(1, -1)) || [];
    
      if (operation.parameters) {
        operation.parameters.forEach(param => {
          if ('$ref' in param) return;
    
          const parameter = param as OpenAPIV3.ParameterObject;
          const paramName = parameter.name;
    
          if (parameter.in === 'path' && args[paramName] !== undefined) {
            pathParams[paramName] = String(args[paramName]);
          } else if (parameter.in === 'query' && args[paramName] !== undefined) {
            queryParams[paramName] = String(args[paramName]);
          }
        });
      }
    
      pathParamNames.forEach(paramName => {
        if (args[paramName] !== undefined && !pathParams[paramName]) {
          pathParams[paramName] = String(args[paramName]);
        }
      });
    
      const usedParams = new Set([...Object.keys(pathParams), ...Object.keys(queryParams)]);
      for (const [key, value] of Object.entries(args)) {
        if (!usedParams.has(key)) {
          bodyParams[key] = value;
        }
      }
    
      const parameters: CallParameters = {};
    
      if (Object.keys(pathParams).length > 0) {
        parameters.path = pathParams;
      }
    
      if (Object.keys(queryParams).length > 0) {
        parameters.query = queryParams;
      }
    
      if (Object.keys(bodyParams).length > 0) {
        parameters.body = bodyParams;
      }
    
      return parameters;
    }
  • The MCP CallTool request handler that dispatches to the dynamic implementation for tools like 'put_profile__id__custom'.
      this.server.setRequestHandler(CallToolRequestSchema, async (request: any): Promise<CallToolResult> => {
        const { name, arguments: args } = request.params;
    
        if (!args) {
          throw new Error('No arguments provided');
        }
        console.log('args', args);
        try {
          const parameters: CallParameters = this.extractParametersFromArgs(name, args);
          return await this.callDynamicTool(name, parameters, args.headers as Record<string, string> | undefined);
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      });
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't specify whether this requires authentication, what happens to unspecified parameters (are they preserved or reset?), whether the update is atomic, or what the response contains. For a complex mutation tool with 27 parameters, this minimal description leaves critical behavioral questions unanswered.

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 extremely concise at just 5 words. It's front-loaded with the core action ('Update profile') and adds a qualifying detail ('with partial parameters'). There's zero wasted language or redundancy. For a tool with extensive schema documentation, this brevity is appropriate if the description were more informative.

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 (27 parameters, nested objects, no output schema, no annotations), the description is inadequate. It doesn't explain what a 'profile' is in this context (browser profile), what 'partial' updates mean operationally, or what happens upon success/failure. For a mutation tool with such rich parameter structure, the description should provide more context about the update semantics and expected behavior.

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 81%, which is high, establishing a baseline of 3. The description adds minimal value beyond the schema by mentioning 'partial parameters,' suggesting that not all parameters need to be specified. However, it doesn't clarify which parameters are optional versus required beyond the schema's 'id' requirement, nor does it explain the semantics of partial updates (e.g., whether unspecified fields are preserved).

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

Purpose2/5

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

The description 'Update profile with partial parameters' is a tautology that essentially restates the tool name 'put_profile__id__custom'. It mentions 'partial parameters' which adds a small nuance about partial updates, but doesn't specify what resource is being updated (browser profiles) or what 'partial' means in practice. Compared to sibling tools like 'patch_profile_name_many' or 'post_profile_custom', it doesn't clearly distinguish its specific purpose.

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

Usage Guidelines1/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. With numerous sibling tools for profile operations (patch_profile_*, post_profile_*, get_profile_*), there's no indication whether this is for bulk updates, specific field updates, or when to choose this over other profile modification tools. The agent receives no usage context from the description.

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

Related 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/gologinapp/gologin-mcp'

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