{"record":{"id":"b68f766404c5c159","repo":"koala73/worldmonitor","slug":"list-followed-countries-does-not-accept-arguments","errorCode":null,"errorMessage":"list_followed_countries does not accept arguments.","messagePattern":"list_followed_countries does not accept arguments\\.","errorType":"exception","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":3025,"sourceCode":"          });\n        }\n        return boundDashboardNavigationResult(await app.openMissionPicker(extra));\n      }, trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.listFollowedCountries,\n      title: 'List Followed Countries',\n      description:\n        'Read the current followed-country list through the same anonymous or signed-in state used by the dashboard. Returns only ISO 3166-1 alpha-2 codes, access state, and the free-tier limit.',\n      inputSchema: {\n        type: 'object',\n        properties: {},\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: true },\n      execute: withBindings(WEBMCP_SPA_TOOL.listFollowedCountries, async (args, extra) => {\n        if (!hasOnlyOwnKeys(args, [])) {\n          throw new SafeWebMcpError(\n            'list_followed_countries does not accept arguments.',\n            'validation',\n          );\n        }\n        return boundFollowedCountryList(await app.listFollowedCountries(extra));\n      }, trackEvent, {\n        successMetadata: (_args, value) => ({\n          resultCount: (value as FollowedCountryListResult).countries.length,\n        }),\n      }),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.setCountryFollowed,\n      title: 'Set Country Followed',\n      description:\n        'Follow or unfollow one country through the dashboard service that owns ISO validation, access state, the free-tier cap, sign-in handoff, and storage. Idempotent for the requested state. Requires target-side cancellation because it persists state or writes to the signed-in account.',\n      inputSchema: {\n        type: 'object',","sourceCodeStart":3007,"sourceCodeEnd":3043,"githubUrl":"https://github.com/koala73/worldmonitor/blob/7d06c8633d256c18e38133030bc3613976a96ec9/src/services/webmcp.ts#L3007-L3043","documentation":"The WebMCP tool list_followed_countries declares an empty properties schema (additionalProperties: false) and takes no arguments at all. The handler calls hasOnlyOwnKeys(args, []) so any argument — even an empty-but-nonempty-keyed object — throws SafeWebMcpError('validation').","triggerScenarios":"Calling list_followed_countries with {}, { limit: 10 }, { country: 'DE' }, or any other key; some clients also send leftover argument objects from a previous tool call.","commonSituations":"Copy-pasting a call template from another MCP tool; a client that always includes an arguments object with default keys; hand-written JSON-RPC payloads that pass {}-shaped filters out of habit.","solutions":["Call list_followed_countries with no arguments (empty object or omitted arguments).","Delete any extra keys like limit, cursor, or country from the call.","Verify with the tool schema that properties is empty before invoking."],"exampleFix":"// before\nconst res = await mcp.callTool('list_followed_countries', { limit: 10 });\n// after\nconst res = await mcp.callTool('list_followed_countries', {});","handlingStrategy":"validation","validationCode":"if (args && Object.keys(args).length > 0) throw new Error('list_followed_countries takes no arguments');","typeGuard":"const isNoArgs = (a: unknown): a is Record<never, never> =>\n  a === undefined || (typeof a === 'object' && a !== null && Object.keys(a).length === 0);","tryCatchPattern":"try {\n  const res = await mcp.callTool('list_followed_countries', {});\n} catch (e) {\n  if (e instanceof Error && e.message.includes('does not accept arguments')) {\n    console.error('This tool is parameterless; drop all arguments', e.message);\n  } else throw e;\n}","preventionTips":["Call parameterless tools with {} or omit arguments entirely.","Avoid shared request-builder helpers that inject default keys.","Confirm properties is empty in the tool schema.","Watch for leftover args when reusing a client call object between tools."],"tags":["mcp","validation","no-arguments"],"backgroundTag":"missing-required-argument","analyzedSha":"7d06c8633d256c18e38133030bc3613976a96ec9","analyzedAt":"2026-09-15T16:44:39.439Z","contentChangedAt":"2026-09-15T16:44:39.439Z","schemaVersion":2},"datasetVersion":"2026-09-15T18:17:12.389Z"}