Skip to main content
Glama

searchconsole.urlTestingTools.mobileFriendlyTest.run

Run a Mobile-Friendly Test for a URL to verify mobile usability and return the JSON response, optionally requesting a screenshot.

Instructions

Runs Mobile-Friendly Test for a given URL [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON RunMobileFriendlyTestRequest object accepting requestScreenshot, url; pass it via params or whole via body_file

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON RunMobileFriendlyTestRequest object.
request_bodyNoRequest body of type RunMobileFriendlyTestRequest: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
screenshotNo
testStatusNo
resourceIssuesNo
mobileFriendlinessNo
mobileFriendlyIssuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON RunMobileFriendlyTestRequest object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type RunMobileFriendlyTestRequest: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "requestScreenshot": {
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "mobileFriendliness": {
      +      "enum": [
      +        "MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED",
      +        "MOBILE_FRIENDLY",
      +        "NOT_MOBILE_FRIENDLY"
      +      ],
      +      "type": "string"
      +    },
      +    "mobileFriendlyIssues": {
      +      "items": {
      +        "properties": {
      +          "rule": {
      +            "enum": [
      +              "MOBILE_FRIENDLY_RULE_UNSPECIFIED",
      +              "USES_INCOMPATIBLE_PLUGINS",
      +              "CONFIGURE_VIEWPORT",
      +              "FIXED_WIDTH_VIEWPORT",
      +              "SIZE_CONTENT_TO_VIEWPORT",
      +              "USE_LEGIBLE_FONT_SIZES",
      +              "TAP_TARGETS_TOO_CLOSE"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "resourceIssues": {
      +      "items": {
      +        "properties": {
      +          "blockedResource": {
      +            "properties": {
      +              "url": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "screenshot": {
      +      "properties": {
      +        "data": {
      +          "type": "string"
      +        },
      +        "mimeType": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "testStatus": {
      +      "properties": {
      +        "details": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "TEST_STATUS_UNSPECIFIED",
      +            "COMPLETE",
      +            "INTERNAL_ERROR",
      +            "PAGE_UNREACHABLE"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does reasonably well: it discloses that this is an HTTP POST that 'creates or triggers a change', that it is refused under --readonly safety profiles, and that it returns the API's response resource as JSON. It omits quota/rate-limit behavior and whether the test result can be returned in a pending state requiring a follow-up call, which are material for this particular API.

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?

The purpose is front-loaded in the first clause and the sentence is dense but readable. The trailing clause enumerating 'requestScreenshot, url' and the body_file routing repeats what the schema already says, so there is some removable redundancy.

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?

An output schema exists, so return-value explanation is not required, and the description still sketches it briefly. The request-construction paths (params merge, body_file) are covered. The main gap is that the asynchronous/quota nature of this API is not mentioned, which could leave an agent unprepared for pending test statuses.

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 coverage is 100%, so the schema already documents all five parameters including the nested request body fields. The description restates the body type and its requestScreenshot/url fields and the params-vs-body_file convention, which is mildly useful but largely duplicates the schema text. Baseline 3 applies.

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 opens with a specific verb+resource: 'Runs Mobile-Friendly Test for a given URL', which is unambiguous. It does not name the closest sibling, searchconsole.urlInspection.index.inspect, so an agent must infer the distinction between a mobile-friendly test and a URL inspection rather than being told.

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?

There is no when-to-use guidance, no exclusions, and no comparison to the sibling urlInspection tool that also operates on a URL. The only conditional statement ('refused under --readonly safety profiles') is about execution permissibility, not about when this tool is the right choice.

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

Deploy Server

Other Tools