Skip to main content
Glama

Metadata MCP Connector

Search Campaigns by Name

search_campaigns_by_names
Read-only

Search for campaigns by name to get campaign details, IDs, and status.

            KEYWORDS: campaign, search, find, lookup, status, active, paused, draft, marketing, advertising

            **USE THIS TOOL WHEN THE USER ASKS ABOUT:**
            - Campaign details, information, or status
            - Finding a campaign by name
            - Getting campaign IDs
            - Checking if a campaign exists
            - Looking up campaign status (active, paused, draft)
            - Any question containing words like: "campaign", "show me", "find", "search", "list", "details", "status"

            **ALWAYS use this tool first** before launching, updating, or referencing any campaign.

            SEARCH FEATURES:
            - Partial, case-insensitive matching (e.g., "Q1" matches "Q1_2026_Campaign")
            - One entry per searched name: the best match (the exact name when the account has one, else the newest neighbour), the other matches, and the best match's FULL campaign as `payload`
            - Searches up to 150 campaigns per term

            PARAMETERS:
            - campaign_names: Array of campaign name strings to search for (required)

            RETURNS:
            {
                "found_campaigns": [
                    {
                        "search_name": "LinkedIn_BoFu",
                        "id": 159490,
                        "name": "LinkedIn_BoFu_Q1_2026",
                        "statusLabel": "Active",
                        "visibility": "VISIBLE",
                        "exact_match": false,
                        "other_matches": [{"id": 159491, "name": "LinkedIn_BoFu_Q1_2026 v2", "statusLabel": "Draft", "visibility": "ARCHIVED", "exact_match": false}],
                        "payload": { ...the full campaign: channels[] with groups[] (audience groups, each with channelCustomAudiences[] carrying customAudienceId and name), groupsExclude[], targetingGroups[], adGroups[], landingPages[], leadGenForms[]... }
                    }
                ],
                "missing_names": ["NonExistent"],
                "total_found": 1
            }

            Read `exact_match` before treating the entry as the campaign the user named: a substring search also returns "<name> SaaS" for "<name>", and when no exact match exists the entry is a neighbour. `visibility` is ARCHIVED for an archived campaign. `payload` is the same document `get_campaign_by_wizard_id` returns, so no second read is needed for the campaign's audiences, ads or offers.

            STATUS LABELS: Active, Paused, Draft, Completed, Unknown

            Use returned campaign IDs with launch_campaign or manage_campaign tools.

            Anchor all date-related decisions to the REAL current date — call get_current_date if you are not already certain what today is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_namesYesArray of campaign names or partial names to search for (case-insensitive, partial matching)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already signal readOnlyHint and non-destructive behavior, and the description adds rich behavioral detail beyond that: partial case-insensitive matching, one best match per searched name, up to 150 campaigns searched per term, exact_match caveats, ARCHIVED visibility semantics, and payload equivalence to get_campaign_by_wizard_id. There is no contradiction with the annotations.

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 description is well-organized with headings, bullets, a parameter section, and a concrete return example, and it front-loads the core purpose and usage. However, the KEYWORDS block and the broad 'any question containing campaign' bullet are somewhat redundant, and the final date-anchoring instruction feels tangential to a name-search tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates thoroughly by showing the full return shape, explaining found_campaigns, missing_names, and total_found, and clarifying exact_match and visibility semantics. It also notes that payload is the full campaign document, so no second read is needed, making the tool complete for both selection and result interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents campaign_names as an array of case-insensitive, partial-match strings, so the baseline is 3. The description adds meaningful context by specifying the 150-campaign search limit and the one-entry-per-searched-name behavior, which helps an agent predict output cardinality, though it does not deeply redefine the parameter itself.

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

Purpose5/5

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

The description states a clear verb-resource pair: 'Search for campaigns by name' to obtain details, IDs, and status. It differentiates the tool by emphasizing name-based lookup and even ties its payload to get_campaign_by_wizard_id, so an agent can distinguish it from sibling tools like search_campaigns_by_utm_value or search_ads_by_names.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description has a dedicated 'USE THIS TOOL WHEN' section listing concrete user intents, and it explicitly instructs agents to use this tool first before launching, updating, or referencing any campaign. It also mentions downstream use with launch_campaign or manage_campaign, but it does not explicitly state when not to use it versus sibling search tools, so it falls just short of full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources