[{"data":1,"prerenderedAt":1945},["ShallowReactive",2],{"docs-\u002Ferrors\u002F":3},{"id":4,"title":5,"body":6,"breadcrumb":1893,"coderail":1900,"dateModified":1934,"datePublished":1934,"description":1935,"extension":1936,"meta":1937,"navigation":1938,"next":1934,"path":1939,"prev":1934,"schemaType":1940,"seo":1941,"stem":1942,"wide":1943,"__hash__":1944},"docs\u002Ferrors.md","Errors",{"type":7,"value":8,"toc":1867},"minimark",[9,24,29,32,70,99,103,627,632,638,641,753,756,761,771,865,869,882,886,897,905,929,964,968,979,983,988,992,999,1031,1039,1043,1050,1074,1078,1091,1123,1126,1129,1220,1232,1236,1254,1257,1260,1318,1324,1327,1376,1382,1426,1511,1517,1580,1586,1592,1598,1693,1697,1700,1851,1863],[10,11,12,13,17,18,23],"p",{},"Every error response from the REST API carries a JSON body with an ",[14,15,16],"code",{},"error"," field. Most errors are a flat envelope with a single string. A few add more fields. HTTP status codes follow standard semantics. The MCP endpoint reports errors differently; see ",[19,20,22],"a",{"href":21},"#mcp-errors","MCP errors",".",[25,26,28],"h2",{"id":27},"envelope","Error envelope",[10,30,31],{},"All non-2xx REST responses return JSON with at minimum:",[33,34,39],"pre",{"className":35,"code":36,"language":37,"meta":38,"style":38},"language-json shiki shiki-themes github-light github-dark","{\n  \"error\": \"\u003Cmessage>\"\n}\n","json","",[14,40,41,50,64],{"__ignoreMap":38},[42,43,46],"span",{"class":44,"line":45},"line",1,[42,47,49],{"class":48},"sVt8B","{\n",[42,51,53,57,60],{"class":44,"line":52},2,[42,54,56],{"class":55},"sj4cs","  \"error\"",[42,58,59],{"class":48},": ",[42,61,63],{"class":62},"sZZnC","\"\u003Cmessage>\"\n",[42,65,67],{"class":44,"line":66},3,[42,68,69],{"class":48},"}\n",[10,71,72,73,75,76,78,79,82,83,86,87,90,91,94,95,98],{},"For most errors the ",[14,74,16],{}," value is a sentence that says what went wrong, and the HTTP status is the machine-readable signal. Four errors use a short code in ",[14,77,16],{}," and put the sentence in a ",[14,80,81],{},"message"," field: ",[14,84,85],{},"rate_limit_exceeded"," (429), ",[14,88,89],{},"insufficient_scope"," (403), ",[14,92,93],{},"payload_too_large"," (413) and ",[14,96,97],{},"rate_limiter_unavailable"," (503).",[25,100,102],{"id":101},"status-codes","Status codes",[104,105,106,125],"table",{},[107,108,109],"thead",{},[110,111,112,116,119],"tr",{},[113,114,115],"th",{},"Status",[113,117,118],{},"Meaning",[113,120,121,122,124],{},"Example ",[14,123,16],{}," message",[126,127,128,142,153,164,175,186,197,209,220,231,242,253,265,276,287,298,318,331,342,353,366,377,389,405,418,429,445,459,472,485,501,515,528,539,550,561,579,596,607],"tbody",{},[110,129,130,134,137],{},[131,132,133],"td",{},"400",[131,135,136],{},"A required field is missing.",[131,138,139],{},[14,140,141],{},"\"Provide either url or gtm_id\"",[110,143,144,146,148],{},[131,145,133],{},[131,147],{},[131,149,150],{},[14,151,152],{},"\"Missing required field: rule_id\"",[110,154,155,157,159],{},[131,156,133],{},[131,158],{},[131,160,161],{},[14,162,163],{},"\"Provide one of: data, gtm_id, url\"",[110,165,166,168,170],{},[131,167,133],{},[131,169],{},[131,171,172],{},[14,173,174],{},"\"Missing required field: data (parsed container)\"",[110,176,177,179,181],{},[131,178,133],{},[131,180],{},[131,182,183],{},[14,184,185],{},"\"Missing required query param: rule_id\"",[110,187,188,190,192],{},[131,189,133],{},[131,191],{},[131,193,194],{},[14,195,196],{},"\"Missing required query param: id\"",[110,198,199,201,204],{},[131,200,133],{},[131,202,203],{},"A value is malformed.",[131,205,206],{},[14,207,208],{},"\"url must be a full http(s) URL\"",[110,210,211,213,215],{},[131,212,133],{},[131,214],{},[131,216,217],{},[14,218,219],{},"\"Invalid gtm_id format: GTM-???\"",[110,221,222,224,226],{},[131,223,133],{},[131,225],{},[131,227,228],{},[14,229,230],{},"\"Invalid key id\"",[110,232,233,235,237],{},[131,234,133],{},[131,236],{},[131,238,239],{},[14,240,241],{},"\"label must be a string\"",[110,243,244,246,248],{},[131,245,133],{},[131,247],{},[131,249,250],{},[14,251,252],{},"\"label must be 60 characters or fewer\"",[110,254,255,257,260],{},[131,256,133],{},[131,258,259],{},"Unknown filter value, misspelt field or bad count. The message lists what is accepted.",[131,261,262],{},[14,263,264],{},"\"Unknown category \\\"privacy\\\". Category must be one of: consent, ga4, ...\"",[110,266,267,269,271],{},[131,268,133],{},[131,270],{},[131,272,273],{},[14,274,275],{},"\"Unknown field: \\\"categories\\\" (did you mean \\\"category\\\"?). Accepted: ...\"",[110,277,278,280,282],{},[131,279,133],{},[131,281],{},[131,283,284],{},[14,285,286],{},"\"top_n must be a number of 0 or more (got -5).\"",[110,288,289,291,293],{},[131,290,133],{},[131,292],{},[131,294,295],{},[14,296,297],{},"\"include_evidence must be true or false (got \\\"yes\\\").\"",[110,299,300,302,308],{},[131,301,133],{},[131,303,304,307],{},[14,305,306],{},"data"," is not a GTM container.",[131,309,310,311,317],{},"See ",[19,312,314,315],{"href":313},"#bad-data","Bad ",[14,316,306],{}," below.",[110,319,320,323,326],{},[131,321,322],{},"401",[131,324,325],{},"Missing or invalid bearer token.",[131,327,328],{},[14,329,330],{},"\"Missing or malformed Authorization header\"",[110,332,333,335,337],{},[131,334,322],{},[131,336],{},[131,338,339],{},[14,340,341],{},"\"Invalid or revoked API key\"",[110,343,344,346,348],{},[131,345,322],{},[131,347],{},[131,349,350],{},[14,351,352],{},"\"Invalid or expired token\"",[110,354,355,358,361],{},[131,356,357],{},"403",[131,359,360],{},"Token type not permitted for this endpoint.",[131,362,363],{},[14,364,365],{},"\"API keys cannot manage API keys — use a session JWT\"",[110,367,368,370,372],{},[131,369,357],{},[131,371],{},[131,373,374],{},[14,375,376],{},"\"MCP access tokens cannot manage API keys — use a session JWT\"",[110,378,379,381,384],{},[131,380,357],{},[131,382,383],{},"Key creation is limited to approved accounts and this account is not one of them.",[131,385,386],{},[14,387,388],{},"\"Key creation is limited to approved accounts.\"",[110,390,391,393,396],{},[131,392,357],{},[131,394,395],{},"The token was not granted the scope this endpoint needs.",[131,397,398,401,402,404],{},[14,399,400],{},"\"insufficient_scope\""," (with a ",[14,403,81],{}," field naming the scope)",[110,406,407,410,413],{},[131,408,409],{},"404",[131,411,412],{},"Resource not found, or no GTM container detected.",[131,414,415],{},[14,416,417],{},"\"No GTM container ID found in page HTML\"",[110,419,420,422,424],{},[131,421,409],{},[131,423],{},[131,425,426],{},[14,427,428],{},"\"Key not found\"",[110,430,431,433,435],{},[131,432,409],{},[131,434],{},[131,436,437,440,441,444],{},[14,438,439],{},"\"Unknown rule_id: \u003Cid>\""," (from ",[14,442,443],{},"POST \u002Fv1\u002Fevaluate-rule",")",[110,446,447,449,451],{},[131,448,409],{},[131,450],{},[131,452,453,440,456,444],{},[14,454,455],{},"\"Rule not found: \u003Cid>\"",[14,457,458],{},"GET \u002Fv1\u002Frules-detail",[110,460,461,464,467],{},[131,462,463],{},"405",[131,465,466],{},"Wrong HTTP method for this endpoint.",[131,468,469],{},[14,470,471],{},"\"Method not allowed. Use POST.\"",[110,473,474,477,480],{},[131,475,476],{},"409",[131,478,479],{},"The account already holds five active API keys.",[131,481,482],{},[14,483,484],{},"\"This account already has 5 active keys. Revoke one to create another.\"",[110,486,487,490,493],{},[131,488,489],{},"413",[131,491,492],{},"Request body over 10 MB.",[131,494,495,401,498,500],{},[14,496,497],{},"\"payload_too_large\"",[14,499,81],{}," field)",[110,502,503,506,509],{},[131,504,505],{},"429",[131,507,508],{},"Daily rate limit exceeded.",[131,510,310,511,317],{},[19,512,514],{"href":513},"#rate-limit-shape","Rate-limit errors",[110,516,517,520,523],{},[131,518,519],{},"500",[131,521,522],{},"Internal error.",[131,524,525],{},[14,526,527],{},"\"Internal error\"",[110,529,530,532,534],{},[131,531,519],{},[131,533],{},[131,535,536],{},[14,537,538],{},"\"Auth check failed\"",[110,540,541,543,545],{},[131,542,519],{},[131,544],{},[131,546,547],{},[14,548,549],{},"\"Rule evaluation failed: \u003Cmessage>\"",[110,551,552,554,556],{},[131,553,519],{},[131,555],{},[131,557,558],{},[14,559,560],{},"\"Registry read failed: \u003Cstatus> \u003Cdetail>\"",[110,562,563,565,567],{},[131,564,519],{},[131,566],{},[131,568,569,572,573,572,576],{},[14,570,571],{},"\"Key generation failed\"",", ",[14,574,575],{},"\"Failed to list keys\"",[14,577,578],{},"\"Revoke failed\"",[110,580,581,584,591],{},[131,582,583],{},"502",[131,585,586,587,590],{},"Upstream fetch failed: the page or Google's ",[14,588,589],{},"gtm.js"," could not be fetched.",[131,592,593],{},[14,594,595],{},"\"Failed to fetch page: https:\u002F\u002Fexample.com (HTTP 403)\"",[110,597,598,600,602],{},[131,599,583],{},[131,601],{},[131,603,604],{},[14,605,606],{},"\"Container fetch failed: Failed to fetch gtm.js: HTTP 404. Google has no published container with that ID: check the ID, and that the container has been published.\"",[110,608,609,612,615],{},[131,610,611],{},"503",[131,613,614],{},"The rate limiter could not be reached. The request was not run.",[131,616,617,401,620,622,623,626],{},[14,618,619],{},"\"rate_limiter_unavailable\"",[14,621,81],{}," field and a ",[14,624,625],{},"Retry-After: 30"," header)",[628,629,631],"h3",{"id":630},"_400","400 — bad request",[10,633,634,635,637],{},"Returned when a required field is missing, a value is malformed, or the request has a field or filter value the endpoint does not take. The ",[14,636,16],{}," string names the specific problem.",[10,639,640],{},"Requests are checked strictly:",[642,643,644,677,693,709,732],"ul",{},[645,646,647,651,652,572,655,658,659,661,662,665,666,669,670,672,673,676],"li",{},[648,649,650],"strong",{},"Unknown fields and query parameters are refused on four endpoints."," These are the bodies of ",[14,653,654],{},"POST \u002Fv1\u002Fscan-url",[14,656,657],{},"POST \u002Fv1\u002Fscan"," and ",[14,660,443],{},", and the query string of ",[14,663,664],{},"GET \u002Fv1\u002Frules",". A misspelt field such as ",[14,667,668],{},"categories"," gets a 400 that names the field. When an accepted name is close, the message suggests it. ",[14,671,458],{}," ignores extra query parameters, and ",[14,674,675],{},"POST \u002Fv1\u002Fapi-keys"," ignores extra body fields.",[645,678,679,682,683,572,686,658,689,692],{},[648,680,681],{},"Filter values must be real."," ",[14,684,685],{},"category",[14,687,688],{},"tier",[14,690,691],{},"status"," must be one of the accepted values. The message lists them. An empty string is refused too: leave the field out.",[645,694,695,682,698,658,701,704,705,708],{},[648,696,697],{},"Counts must be 0 or more.",[14,699,700],{},"top_n",[14,702,703],{},"limit"," take a number or numeric text such as ",[14,706,707],{},"\"10\"",". A fraction is rounded down. A negative number or other text is refused.",[645,710,711,724,725,658,728,731],{},[648,712,713,716,717,720,721,23],{},[14,714,715],{},"include_evidence"," must be ",[14,718,719],{},"true"," or ",[14,722,723],{},"false"," The text forms ",[14,726,727],{},"\"true\"",[14,729,730],{},"\"false\""," are accepted.",[645,733,734,740,741,743,744,572,746,572,748,720,750,752],{},[648,735,736,739],{},[14,737,738],{},"null"," counts as left out."," A ",[14,742,738],{}," for ",[14,745,685],{},[14,747,688],{},[14,749,700],{},[14,751,715],{}," in a request body is treated as if the field was not sent. It is not an error.",[10,754,755],{},"A REST request that fails one of these checks has already been counted against the daily limit.",[628,757,314,759,38],{"id":758},"bad-data",[14,760,306],{},[10,762,763,658,765,767,768,770],{},[14,764,657],{},[14,766,443],{}," take a container in ",[14,769,306],{},". It must be a GTM JSON export, sent as downloaded, or a container TagManifest has already parsed. Anything else is refused, so that input which was never audited cannot come back with zero findings and a perfect score.",[104,772,773,784],{},[107,774,775],{},[110,776,777,781],{},[113,778,779,124],{},[14,780,16],{},[113,782,783],{},"Cause",[126,785,786,798,818,843,853],{},[110,787,788,793],{},[131,789,790],{},[14,791,792],{},"\"data must be a GTM container: a GTM JSON export or a parsed container object\"",[131,794,795,797],{},[14,796,306],{}," is not an object, for example a string or an array.",[110,799,800,805],{},[131,801,802],{},[14,803,804],{},"\"data.containerVersion is not a GTM export: expected a container record with a publicId\"",[131,806,807,809,810,813,814,817],{},[14,808,306],{}," has a ",[14,811,812],{},"containerVersion"," key but no ",[14,815,816],{},"containerVersion.container"," record with an ID.",[110,819,820,825],{},[131,821,822],{},[14,823,824],{},"\"data.containerVersion.tag must be an array of objects\"",[131,826,827,572,830,572,833,720,836,839,840,842],{},[14,828,829],{},"tag",[14,831,832],{},"trigger",[14,834,835],{},"variable",[14,837,838],{},"folder"," inside ",[14,841,812],{}," is present but is not an array of objects. The message names the key.",[110,844,845,850],{},[131,846,847],{},[14,848,849],{},"\"Could not parse GTM export: \u003Cdetail>\"",[131,851,852],{},"The export has the right outline but could not be parsed.",[110,854,855,860],{},[131,856,857],{},[14,858,859],{},"\"data is not a GTM container: expected a GTM JSON export (with containerVersion) or a parsed container (with tags, triggers and variables arrays of objects)\"",[131,861,862,864],{},[14,863,306],{}," is an object but is neither form.",[628,866,868],{"id":867},"_401","401 — unauthorized",[10,870,871,872,875,876,878,879,881],{},"Returned when the ",[14,873,874],{},"Authorization"," header is absent, the bearer token is malformed, or the token is unknown, expired or revoked. The message tells API key failures (",[14,877,341],{},") from other token failures (",[14,880,352],{},").",[628,883,885],{"id":884},"_403","403 — forbidden",[10,887,888,889,892,893,896],{},"A 403 is returned when an API key or a valid MCP access token is sent to the ",[14,890,891],{},"\u002Fv1\u002Fapi-keys"," endpoints. A token that starts with ",[14,894,895],{},"tm_"," is refused on the prefix alone. An MCP access token is checked first, so an expired one gets a 401. Key management takes only the account page's session token. This stops a leaked key, or a token granted to an MCP client, from creating more keys.",[10,898,899,901,902,904],{},[14,900,675],{}," can also return a 403 with ",[14,903,388],{}," Key creation can be limited to a list of approved accounts. This is the answer for a signed-in account outside that list.",[10,906,907,908,911,912,915,916,658,918,920,921,924,925,928],{},"A 403 with ",[14,909,910],{},"\"error\": \"insufficient_scope\""," is returned when an MCP access token is sent to a REST endpoint it was not granted. A token granted only ",[14,913,914],{},"mcp:read"," can call ",[14,917,664],{},[14,919,458],{},". The endpoints that run a scan or a rule need ",[14,922,923],{},"mcp:tools",". The response carries a ",[14,926,927],{},"WWW-Authenticate"," header that names the scope. The call is not counted against the rate limit. API keys carry both scopes.",[33,930,932],{"className":35,"code":931,"language":37,"meta":38,"style":38},"{\n  \"error\": \"insufficient_scope\",\n  \"message\": \"This token was not granted 'mcp:tools', which this endpoint requires.\"\n}\n",[14,933,934,938,949,959],{"__ignoreMap":38},[42,935,936],{"class":44,"line":45},[42,937,49],{"class":48},[42,939,940,942,944,946],{"class":44,"line":52},[42,941,56],{"class":55},[42,943,59],{"class":48},[42,945,400],{"class":62},[42,947,948],{"class":48},",\n",[42,950,951,954,956],{"class":44,"line":66},[42,952,953],{"class":55},"  \"message\"",[42,955,59],{"class":48},[42,957,958],{"class":62},"\"This token was not granted 'mcp:tools', which this endpoint requires.\"\n",[42,960,962],{"class":44,"line":961},4,[42,963,69],{"class":48},[628,965,967],{"id":966},"_404","404 — not found",[10,969,970,971,974,975,978],{},"Used for three situations: a key ID that does not exist or belongs to another user, a ",[14,972,973],{},"rule_id"," that matches no rule, and a page whose HTML contains no ",[14,976,977],{},"GTM-"," container ID.",[628,980,982],{"id":981},"_409","409 — conflict",[10,984,985,987],{},[14,986,675],{}," returns 409 when the account already has five active keys. Revoke one, then create the new key. Revoked keys do not count towards the five.",[628,989,991],{"id":990},"_413","413 — payload too large",[10,993,994,995,998],{},"Request bodies are limited to 10 MB on the scan and rule endpoints and on ",[14,996,997],{},"\u002Fmcp",". A larger body is refused before it is processed:",[33,1000,1002],{"className":35,"code":1001,"language":37,"meta":38,"style":38},"{\n  \"error\": \"payload_too_large\",\n  \"message\": \"Request body too large. The limit is 10 MB.\"\n}\n",[14,1003,1004,1008,1018,1027],{"__ignoreMap":38},[42,1005,1006],{"class":44,"line":45},[42,1007,49],{"class":48},[42,1009,1010,1012,1014,1016],{"class":44,"line":52},[42,1011,56],{"class":55},[42,1013,59],{"class":48},[42,1015,497],{"class":62},[42,1017,948],{"class":48},[42,1019,1020,1022,1024],{"class":44,"line":66},[42,1021,953],{"class":55},[42,1023,59],{"class":48},[42,1025,1026],{"class":62},"\"Request body too large. The limit is 10 MB.\"\n",[42,1028,1029],{"class":44,"line":961},[42,1030,69],{"class":48},[10,1032,1033,1035,1036,23],{},[14,1034,675],{}," has a much smaller limit of 16 KB and answers ",[14,1037,1038],{},"{ \"error\": \"Request body too large\" }",[628,1040,1042],{"id":1041},"_502","502 — bad gateway",[10,1044,1045,1046,1049],{},"Returned when the API accepted the request but could not fetch something it needed: the page you named, or the container file from ",[14,1047,1048],{},"www.googletagmanager.com",". The message includes the reason, usually the HTTP status the other server returned.",[642,1051,1052,1058,1071],{},[645,1053,1054,1057],{},[14,1055,1056],{},"\"Failed to fetch page: …\""," means the page could not be fetched. Check the address is public and reachable.",[645,1059,1060,1063,1064,1066,1067,1070],{},[14,1061,1062],{},"\"Container fetch failed: Failed to fetch gtm.js: HTTP 404…\""," means Google has no published container with that ID. On ",[14,1065,654],{}," the message adds a hint: ",[14,1068,1069],{},"Google has no published container with that ID: check the ID, and that the container has been published."," Retrying will give the same result.",[645,1072,1073],{},"Other upstream failures may clear on a retry.",[628,1075,1077],{"id":1076},"_503","503 — limiter unavailable",[10,1079,1080,1081,572,1083,658,1085,1087,1088,1090],{},"If the rate limiter cannot be reached, ",[14,1082,654],{},[14,1084,657],{},[14,1086,443],{}," refuse the request instead of running it uncounted. The response has a ",[14,1089,625],{}," header.",[33,1092,1094],{"className":35,"code":1093,"language":37,"meta":38,"style":38},"{\n  \"error\": \"rate_limiter_unavailable\",\n  \"message\": \"Rate limiter temporarily unavailable; request rejected to protect compute limits. Please retry shortly.\"\n}\n",[14,1095,1096,1100,1110,1119],{"__ignoreMap":38},[42,1097,1098],{"class":44,"line":45},[42,1099,49],{"class":48},[42,1101,1102,1104,1106,1108],{"class":44,"line":52},[42,1103,56],{"class":55},[42,1105,59],{"class":48},[42,1107,619],{"class":62},[42,1109,948],{"class":48},[42,1111,1112,1114,1116],{"class":44,"line":66},[42,1113,953],{"class":55},[42,1115,59],{"class":48},[42,1117,1118],{"class":62},"\"Rate limiter temporarily unavailable; request rejected to protect compute limits. Please retry shortly.\"\n",[42,1120,1121],{"class":44,"line":961},[42,1122,69],{"class":48},[25,1124,514],{"id":1125},"rate-limit-shape",[10,1127,1128],{},"When the daily limit for a tool is exhausted, the endpoint returns HTTP 429 with an extended error body:",[104,1130,1131,1144],{},[107,1132,1133],{},[110,1134,1135,1138,1141],{},[113,1136,1137],{},"Field",[113,1139,1140],{},"Type",[113,1142,1143],{},"Description",[126,1145,1146,1161,1172,1184,1196,1208],{},[110,1147,1148,1152,1155],{},[131,1149,1150],{},[14,1151,16],{},[131,1153,1154],{},"string",[131,1156,1157,1158,23],{},"Always ",[14,1159,1160],{},"\"rate_limit_exceeded\"",[110,1162,1163,1167,1169],{},[131,1164,1165],{},[14,1166,81],{},[131,1168,1154],{},[131,1170,1171],{},"Human-readable message including tool name, count, and limit.",[110,1173,1174,1179,1181],{},[131,1175,1176],{},[14,1177,1178],{},"tool",[131,1180,1154],{},[131,1182,1183],{},"The tool bucket that was exhausted.",[110,1185,1186,1190,1193],{},[131,1187,1188],{},[14,1189,703],{},[131,1191,1192],{},"number",[131,1194,1195],{},"Daily cap for this tool.",[110,1197,1198,1203,1205],{},[131,1199,1200],{},[14,1201,1202],{},"count",[131,1204,1192],{},[131,1206,1207],{},"Current count at the time of the failure.",[110,1209,1210,1215,1217],{},[131,1211,1212],{},[14,1213,1214],{},"reset_at",[131,1216,1154],{},[131,1218,1219],{},"ISO 8601 UTC timestamp when the bucket resets (next 00:00 UTC).",[10,1221,1222,1223,1226,1227,1231],{},"The ",[14,1224,1225],{},"X-RateLimit-*"," headers are present on a 429. See ",[19,1228,1230],{"href":1229},"\u002Frate-limits\u002F","Rate limits"," for which responses carry them and for the per-tool limits.",[25,1233,1235],{"id":1234},"auth-errors","Auth errors",[10,1237,1238,1239,1242,1243,1245,1246,1248,1249,1253],{},"Auth errors return a plain ",[14,1240,1241],{},"{ \"error\": \"...\" }"," envelope with HTTP 401 or 403. The one exception is ",[14,1244,89],{},", which adds a ",[14,1247,81],{}," field. See ",[19,1250,1252],{"href":1251},"\u002Fauth\u002F","Authentication"," for the token kinds and the full list of messages.",[25,1255,22],{"id":1256},"mcp-errors",[10,1258,1259],{},"The MCP endpoint speaks JSON-RPC 2.0. A tool call that goes wrong is reported in one of three ways. All three come back over HTTP 200.",[104,1261,1262,1275],{},[107,1263,1264],{},[110,1265,1266,1269,1272],{},[113,1267,1268],{},"What went wrong",[113,1270,1271],{},"How it is reported",[113,1273,1274],{},"Counted against the rate limit",[126,1276,1277,1291,1304],{},[110,1278,1279,1282,1288],{},[131,1280,1281],{},"Bad arguments caught by the checks that run first",[131,1283,1284,1285],{},"JSON-RPC error, code ",[14,1286,1287],{},"-32602",[131,1289,1290],{},"No",[110,1292,1293,1296,1301],{},[131,1294,1295],{},"Rate limit reached, or limiter unavailable",[131,1297,1284,1298],{},[14,1299,1300],{},"-32603",[131,1302,1303],{},"—",[110,1305,1306,1309,1315],{},[131,1307,1308],{},"The tool ran and failed, including bad input found only while it ran",[131,1310,1311,1312],{},"A normal result with ",[14,1313,1314],{},"isError: true",[131,1316,1317],{},"Yes",[628,1319,1321,1322],{"id":1320},"bad-arguments-32602","Bad arguments: ",[14,1323,1287],{},[10,1325,1326],{},"Some checks run before the tool starts and before the rate limit is touched. A call refused by one of them does not use up one of the day's calls. These checks are:",[642,1328,1329,1332,1340,1347,1357,1364,1373],{},[645,1330,1331],{},"an unknown tool name",[645,1333,1334,1335,743,1337],{},"a missing required argument, such as ",[14,1336,973],{},[14,1338,1339],{},"get_rule",[645,1341,1342,1343,1346],{},"a top-level argument the tool does not take. The message suggests an accepted name when one is close. ",[14,1344,1345],{},"account_status"," is the exception: it ignores extra arguments",[645,1348,1349,1350,572,1352,720,1354,1356],{},"a ",[14,1351,685],{},[14,1353,688],{},[14,1355,691],{}," that is not an accepted value",[645,1358,1349,1359,720,1361,1363],{},[14,1360,700],{},[14,1362,703],{}," that is negative or not a number",[645,1365,1366,1367,1370,1371],{},"a top-level string or object argument of the wrong basic type, such as a number for ",[14,1368,1369],{},"url"," or a string for ",[14,1372,306],{},[645,1374,1375],{},"a token without the scope the tool needs",[10,1377,1378,1379,1381],{},"These checks look at top-level arguments only. The mistakes below are found once the tool is running. The call has been counted by then, and the answer is a tool result with ",[14,1380,1314],{},":",[642,1383,1384,1389,1414],{},[645,1385,1349,1386,1388],{},[14,1387,306],{}," object that is not a GTM container",[645,1390,1391,1392,1394,1395,743,1398,1401,1402,572,1404,658,1406,743,1408,658,1411],{},"no container source: neither ",[14,1393,1369],{}," nor ",[14,1396,1397],{},"gtm_id",[14,1399,1400],{},"scan_url",", or none of ",[14,1403,1369],{},[14,1405,1397],{},[14,1407,306],{},[14,1409,1410],{},"evaluate_rule",[14,1412,1413],{},"get_health_score",[645,1415,1416,1417,720,1419,1422,1423],{},"a bad value inside ",[14,1418,19],{},[14,1420,1421],{},"b"," of ",[14,1424,1425],{},"compare_containers",[33,1427,1429],{"className":35,"code":1428,"language":37,"meta":38,"style":38},"{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"error\": {\n    \"code\": -32602,\n    \"message\": \"Unknown category \\\"privacy\\\". Category must be one of: consent, ga4, ads, ecommerce, security, pii, performance, quality, organization, dead-code. To check one rule by its rule_id, use evaluate_rule.\"\n  }\n}\n",[14,1430,1431,1435,1447,1459,1466,1478,1500,1506],{"__ignoreMap":38},[42,1432,1433],{"class":44,"line":45},[42,1434,49],{"class":48},[42,1436,1437,1440,1442,1445],{"class":44,"line":52},[42,1438,1439],{"class":55},"  \"jsonrpc\"",[42,1441,59],{"class":48},[42,1443,1444],{"class":62},"\"2.0\"",[42,1446,948],{"class":48},[42,1448,1449,1452,1454,1457],{"class":44,"line":66},[42,1450,1451],{"class":55},"  \"id\"",[42,1453,59],{"class":48},[42,1455,1456],{"class":55},"3",[42,1458,948],{"class":48},[42,1460,1461,1463],{"class":44,"line":961},[42,1462,56],{"class":55},[42,1464,1465],{"class":48},": {\n",[42,1467,1469,1472,1474,1476],{"class":44,"line":1468},5,[42,1470,1471],{"class":55},"    \"code\"",[42,1473,59],{"class":48},[42,1475,1287],{"class":55},[42,1477,948],{"class":48},[42,1479,1481,1484,1486,1489,1492,1495,1497],{"class":44,"line":1480},6,[42,1482,1483],{"class":55},"    \"message\"",[42,1485,59],{"class":48},[42,1487,1488],{"class":62},"\"Unknown category ",[42,1490,1491],{"class":55},"\\\"",[42,1493,1494],{"class":62},"privacy",[42,1496,1491],{"class":55},[42,1498,1499],{"class":62},". Category must be one of: consent, ga4, ads, ecommerce, security, pii, performance, quality, organization, dead-code. To check one rule by its rule_id, use evaluate_rule.\"\n",[42,1501,1503],{"class":44,"line":1502},7,[42,1504,1505],{"class":48},"  }\n",[42,1507,1509],{"class":44,"line":1508},8,[42,1510,69],{"class":48},[628,1512,1514,1515],{"id":1513},"rate-limit-32603","Rate limit: ",[14,1516,1300],{},[33,1518,1520],{"className":35,"code":1519,"language":37,"meta":38,"style":38},"{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 7,\n  \"error\": {\n    \"code\": -32603,\n    \"message\": \"Rate limit exceeded for scan_url: 101\u002F100. Resets at 2026-05-05T00:00:00.000Z.\"\n  }\n}\n",[14,1521,1522,1526,1536,1547,1553,1563,1572,1576],{"__ignoreMap":38},[42,1523,1524],{"class":44,"line":45},[42,1525,49],{"class":48},[42,1527,1528,1530,1532,1534],{"class":44,"line":52},[42,1529,1439],{"class":55},[42,1531,59],{"class":48},[42,1533,1444],{"class":62},[42,1535,948],{"class":48},[42,1537,1538,1540,1542,1545],{"class":44,"line":66},[42,1539,1451],{"class":55},[42,1541,59],{"class":48},[42,1543,1544],{"class":55},"7",[42,1546,948],{"class":48},[42,1548,1549,1551],{"class":44,"line":961},[42,1550,56],{"class":55},[42,1552,1465],{"class":48},[42,1554,1555,1557,1559,1561],{"class":44,"line":1468},[42,1556,1471],{"class":55},[42,1558,59],{"class":48},[42,1560,1300],{"class":55},[42,1562,948],{"class":48},[42,1564,1565,1567,1569],{"class":44,"line":1480},[42,1566,1483],{"class":55},[42,1568,59],{"class":48},[42,1570,1571],{"class":62},"\"Rate limit exceeded for scan_url: 101\u002F100. Resets at 2026-05-05T00:00:00.000Z.\"\n",[42,1573,1574],{"class":44,"line":1502},[42,1575,1505],{"class":48},[42,1577,1578],{"class":44,"line":1508},[42,1579,69],{"class":48},[10,1581,1582,1583,1585],{},"There are no ",[14,1584,1225],{}," headers on MCP responses. The reset time is in the message.",[628,1587,1589,1590],{"id":1588},"tool-failures-iserror-true","Tool failures: ",[14,1591,1314],{},[10,1593,1594,1595,1597],{},"A tool that starts and then fails returns a normal JSON-RPC result. The result has ",[14,1596,1314],{}," and the message as text content, so the model can read it and recover. Examples are a rule ID that does not exist, a page with no GTM snippet, and a container Google does not serve.",[33,1599,1601],{"className":35,"code":1600,"language":37,"meta":38,"style":38},"{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 4,\n  \"result\": {\n    \"content\": [\n      { \"type\": \"text\", \"text\": \"Rule not found: not-a-rule\" }\n    ],\n    \"isError\": true\n  }\n}\n",[14,1602,1603,1607,1617,1628,1635,1643,1668,1673,1683,1688],{"__ignoreMap":38},[42,1604,1605],{"class":44,"line":45},[42,1606,49],{"class":48},[42,1608,1609,1611,1613,1615],{"class":44,"line":52},[42,1610,1439],{"class":55},[42,1612,59],{"class":48},[42,1614,1444],{"class":62},[42,1616,948],{"class":48},[42,1618,1619,1621,1623,1626],{"class":44,"line":66},[42,1620,1451],{"class":55},[42,1622,59],{"class":48},[42,1624,1625],{"class":55},"4",[42,1627,948],{"class":48},[42,1629,1630,1633],{"class":44,"line":961},[42,1631,1632],{"class":55},"  \"result\"",[42,1634,1465],{"class":48},[42,1636,1637,1640],{"class":44,"line":1468},[42,1638,1639],{"class":55},"    \"content\"",[42,1641,1642],{"class":48},": [\n",[42,1644,1645,1648,1651,1653,1656,1658,1660,1662,1665],{"class":44,"line":1480},[42,1646,1647],{"class":48},"      { ",[42,1649,1650],{"class":55},"\"type\"",[42,1652,59],{"class":48},[42,1654,1655],{"class":62},"\"text\"",[42,1657,572],{"class":48},[42,1659,1655],{"class":55},[42,1661,59],{"class":48},[42,1663,1664],{"class":62},"\"Rule not found: not-a-rule\"",[42,1666,1667],{"class":48}," }\n",[42,1669,1670],{"class":44,"line":1502},[42,1671,1672],{"class":48},"    ],\n",[42,1674,1675,1678,1680],{"class":44,"line":1508},[42,1676,1677],{"class":55},"    \"isError\"",[42,1679,59],{"class":48},[42,1681,1682],{"class":55},"true\n",[42,1684,1686],{"class":44,"line":1685},9,[42,1687,1505],{"class":48},[42,1689,1691],{"class":44,"line":1690},10,[42,1692,69],{"class":48},[628,1694,1696],{"id":1695},"transport-errors","Transport errors",[10,1698,1699],{},"A few failures happen before a tool is reached and do use HTTP status codes. Most have a JSON-RPC error body. Two do not, as the table shows.",[104,1701,1702,1714],{},[107,1703,1704],{},[110,1705,1706,1709,1712],{},[113,1707,1708],{},"HTTP",[113,1710,1711],{},"JSON-RPC code",[113,1713,783],{},[126,1715,1716,1728,1750,1764,1778,1795,1807,1829,1840],{},[110,1717,1718,1720,1725],{},[131,1719,133],{},[131,1721,1722],{},[14,1723,1724],{},"-32700",[131,1726,1727],{},"The body is not valid JSON.",[110,1729,1730,1732,1737],{},[131,1731,133],{},[131,1733,1734],{},[14,1735,1736],{},"-32600",[131,1738,1739,1740,1743,1744,1747,1748,23],{},"No ",[14,1741,1742],{},"method",", or a ",[14,1745,1746],{},"jsonrpc"," version other than ",[14,1749,1444],{},[110,1751,1752,1754,1758],{},[131,1753,133],{},[131,1755,1756],{},[14,1757,1287],{},[131,1759,1760,1763],{},[14,1761,1762],{},"tools\u002Fcall"," without a tool name.",[110,1765,1766,1768,1772],{},[131,1767,322],{},[131,1769,1770],{},[14,1771,1736],{},[131,1773,1774,1775,1777],{},"Missing or invalid token. The response has a ",[14,1776,927],{}," header so the client can sign in again.",[110,1779,1780,1782,1785],{},[131,1781,322],{},[131,1783,1784],{},"none",[131,1786,1787,1788,1791,1792,1794],{},"A notification (a message with no ",[14,1789,1790],{},"id",") with a missing or invalid token. The body is empty. The ",[14,1793,927],{}," header is still set.",[110,1796,1797,1799,1804],{},[131,1798,409],{},[131,1800,1801],{},[14,1802,1803],{},"-32601",[131,1805,1806],{},"Unknown method.",[110,1808,1809,1811,1813],{},[131,1810,463],{},[131,1812,1784],{},[131,1814,1815,1816,572,1819,720,1822,1825,1826,23],{},"An HTTP method other than ",[14,1817,1818],{},"POST",[14,1820,1821],{},"GET",[14,1823,1824],{},"OPTIONS",". The body is plain JSON: ",[14,1827,1828],{},"{ \"error\": \"Method not allowed\" }",[110,1830,1831,1833,1837],{},[131,1832,489],{},[131,1834,1835],{},[14,1836,1736],{},[131,1838,1839],{},"Body over 10 MB.",[110,1841,1842,1844,1848],{},[131,1843,519],{},[131,1845,1846],{},[14,1847,1300],{},[131,1849,1850],{},"The token could not be checked, or the server hit an unexpected error.",[10,1852,1853,1854,1856,1857,1859,1860,1862],{},"A notification that gets past the token check is answered with HTTP 202 and an empty body. It is acknowledged and not run, even when its ",[14,1855,1742],{}," is ",[14,1858,1762],{},". Put an ",[14,1861,1790],{}," on every message you want an answer to.",[1864,1865,1866],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":38,"searchDepth":52,"depth":52,"links":1868},[1869,1870,1882,1883,1884],{"id":27,"depth":52,"text":28},{"id":101,"depth":52,"text":102,"children":1871},[1872,1873,1875,1876,1877,1878,1879,1880,1881],{"id":630,"depth":66,"text":631},{"id":758,"depth":66,"text":1874},"Bad data",{"id":867,"depth":66,"text":868},{"id":884,"depth":66,"text":885},{"id":966,"depth":66,"text":967},{"id":981,"depth":66,"text":982},{"id":990,"depth":66,"text":991},{"id":1041,"depth":66,"text":1042},{"id":1076,"depth":66,"text":1077},{"id":1125,"depth":52,"text":514},{"id":1234,"depth":52,"text":1235},{"id":1256,"depth":52,"text":22,"children":1885},[1886,1888,1890,1892],{"id":1320,"depth":66,"text":1887},"Bad arguments: -32602",{"id":1513,"depth":66,"text":1889},"Rate limit: -32603",{"id":1588,"depth":66,"text":1891},"Tool failures: isError: true",{"id":1695,"depth":66,"text":1696},[1894,1897,1899],{"label":1895,"href":1896},"API Reference","\u002F",{"label":1898},"Getting started",{"label":5},{"cards":1901,"onpage":1928},[1902,1907,1913,1918,1924],{"title":28,"tabs":1903},[1904],{"label":1905,"language":37,"code":1906},"JSON","{\n  \"error\": \"No GTM container ID found in page HTML\"\n}\n",{"title":1908,"variant":1909,"tabs":1910},"429 — rate limit","response",[1911],{"label":1905,"language":37,"code":1912},"{\n  \"error\": \"rate_limit_exceeded\",\n  \"message\": \"Daily limit reached for scan_url (101\u002F100)\",\n  \"tool\": \"scan_url\",\n  \"limit\": 100,\n  \"count\": 101,\n  \"reset_at\": \"2026-05-05T00:00:00.000Z\"\n}\n",{"title":1914,"variant":1909,"tabs":1915},"401 — auth failure",[1916],{"label":1905,"language":37,"code":1917},"{\n  \"error\": \"Invalid or revoked API key\"\n}\n",{"title":1919,"variant":1909,"tabs":1920},"MCP — bad argument",[1921],{"label":1922,"language":37,"code":1923},"JSON-RPC","{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"error\": {\n    \"code\": -32602,\n    \"message\": \"Unknown argument for scan_url: \\\"categories\\\" (did you mean \\\"category\\\"?). Accepted: url, gtm_id, category, tier, top_n, data.\"\n  }\n}\n",{"title":1925,"variant":1909,"tabs":1926},"MCP — tool failure",[1927],{"label":1922,"language":37,"code":1600},[1929,1930,1931,1932,1933],{"id":27,"label":28},{"id":101,"label":102},{"id":1125,"label":514},{"id":1234,"label":1235},{"id":1256,"label":22},null,"How TagManifest returns errors. The REST envelope, status codes, example messages, and how errors look over MCP.","md",{},true,"\u002Ferrors","TechArticle",{"title":5,"description":1935},"errors",false,"jWDAoQJVdn8qwprtPoYgBpnj5Sx-jNbRzZRafImIH7k",1796069482307]