MCP server for interacting with Facebook Ads API to manage ad accounts, campaigns, ad sets, ads, and retrieve insights and analytics data
This server has significant definition quality gaps. Both tools have descriptions present, but they are verbose and include inappropriate imperative instructions to the agent (e.g., 'CRITICAL: This function MUST automatically fetch ALL pages...'). Descriptions should be declarative, not prescriptive. However, the descriptions for parameters lack clarity about constraints (e.g., what format is act_id? What are valid field values?). Neither tool documents return schemas or output structure, making it impossible for LLMs to plan downstream calls or know what fields to expect. The naming is acceptable (list_, get_) but generic. No tool has error handling guidance, recovery paths, or examples of valid vs. invalid inputs. Security is a major concern: the server accepts a Facebook access token via command-line argument (--fb-token), which violates pattern:secret-injection, credentials should never be exposed as parameters or command-line args, as they will appear in logs and traces. The token is redacted in some error messages but the underlying pattern is unsafe.
Get details of a specific ad account as per the fields provided
List down the ad accounts and their names associated with your Facebook account. CRITICAL: This function MUST automatically fetch ALL pages using pagination. When the response contains a 'paging.next' URL, IMMEDIATELY and AUTOMATICALLY use the facebook_fetch_pagination_url tool to fetch the next page. Continue this process until no 'next' URL exists. Do NOT ask the user for permission to continue pagination. Do NOT stop after the first page. Always return the complete consolidated list of ALL ad accounts across all pages in a single response. This is a requirement, not optional behavior.
This tool cannot be properly invoked by an LLM without documented parameters or their types.
Tool descriptions are prescriptive and include imperative instructions ('CRITICAL: This function MUST...') rather than declarative descriptions of what the tool does. Descriptions should tell LLMs WHAT the tool does and WHEN to use it, not HOW to use it or what internal behavior is required. The description for list_ad_accounts is 445 characters, exceeding the recommended 10-1024 range and burying key information.
No output schemas are documented. LLMs cannot determine what fields to expect in responses, making it impossible to plan downstream calls or extract the right data. Both tools need documented return types and field descriptions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 47 | 2026-07-28+ | v2 |
Facebook access token is passed via command-line argument (--fb-token), violating pattern:secret-injection. Credentials should never be exposed as parameters or in command line arguments, as they will appear in logs, traces, and process lists. The redaction logic in _redact_token is defensive but does not address the root problem.
Parameter 'act_id' has no format or validation guidance in its description. The example 'act_1234567890' is embedded in the description, which can lead LLMs to reuse it literally. Format constraints should be formal (regex/pattern) or clearly stated, not example-based.
Parameter 'fields' in get_details_of_ad_account lists available fields in the description rather than constraining them via an enum. This invites hallucinated field names. The description should either enumerate valid fields as a formal constraint or state 'See available fields: ...'
No error handling guidance. If the Graph API returns a 401 (invalid token), 404 (account not found), or rate limit error, the tool raises a generic RequestException with a redacted message. LLMs receive no actionable guidance on what to do next, whether to retry, or how to fix the issue.
list_ad_accounts description mentions automatic pagination and the facebook_fetch_pagination_url tool, but this tool is never defined in the server code. The description references a non-existent tool, which will confuse LLMs and agents.