MMetadata /docs
Docs/Tools/retrieve_target_group_by_id

retrieve_target_group_by_id

Get detailed target group information by ID.

Read audiences

Returns data. Calling it changes nothing, so it is safe in an unattended loop.

What it does

Get detailed target group information by ID.

USE FOR: "get target group details for ID X", "show target group with ID Y", "check target group configuration", "show audiences in target group X", analyze setup before changes.

PREREQUISITE: If you don't have the ID, use list_target_groups(name="X") first.

RESPONSE: {id, name, channel, audiences, targeting, status, createdDate, modifiedDate, size, configuration, ...}

WORKFLOW: list_target_groups(name="target_group_name") → get ID → retrieve_target_group_by_id(target_group_id=ID)

Arguments

ArgumentTypeNotes
target_group_id integer required The unique ID of the target group to retrieve. Must be a positive integer. If you don't have the ID, use list_target_groups to search by name first.

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"retrieve_target_group_by_id","arguments":{"target_group_id":0}}}'

Response

Recorded with these arguments. Enum values are the first the tool's own schema declares; ids were fetched live from a list_ call immediately before.

arguments used
{
 "target_group_id": "[number redacted]"
}

Real, from the production server, in 258 ms. Values that identify a customer or disclose money are replaced with typed placeholders; keys, types and nesting are exactly as returned.

recorded response
{
 "id": "[number redacted]",
 "name": "[name redacted]",
 "channel": "REDDIT",
 "matchCount": "[number redacted]",
 "matchCountType": "FIXED_SIZE",
 "isMatchCountTooSmall": false,
 "visibility": "VISIBLE",
 "targeting": {
  "include": [
   {
    "isModifiable": false,
    "audiences": [],
    "criteria": [
     {
      "type": "LOCATION",
      "data": {
       "countries": [
        "[number redacted]"
       ],
       "states": [],
       "nativeLocation": [
        {
         "externalId": "[externalId redacted]",
         "name": "[name redacted]"
        }
       ]
      }
     }
    ]
   },
   {
    "isModifiable": true,
    "audiences": [],
    "criteria": [
     {
      "type": "COMMUNITIES",
      "data": [
       {
        "externalId": "t5_2qldo",
        "name": "[name redacted]"
       },
       {
        "externalId": "t5_2qh26",
        "name": "startups"
       },
       {
        "externalId": "t5_2qr34",
        "name": "smallbusiness"
       },
       {
        "externalId": "t5_2ykna",
        "name": "growmybusiness"
       },
       {
        "externalId": "t5_35azv",
        "name": "[name redacted]"
       },
       {
        "externalId": "t5_2w2vn",
        "name": "[name redacted]"
       },
       {
        "externalId": "t5_2qs0q",
        "name": "webdev"
       },
       {
        "externalId": "t5_2qn3h",
        "name": "webhosting"
       },
       {
        "externalId": "t5_2qhjq",
        "name": "[name redacted]"
       }
      ]
     },
     {
      "type": "INTERESTS",
      "data": [
       {
        "externalId": "business_v3",
        "name": "[name redacted]"
       },
       {
        "externalId": "entrepreneurship_v3",
        "name": "[name redacted]"
       },
       {
        "externalId": "software_v3",
        "name": "[name redacted]"
       }
      ]
     }
    ]
   }
  ],
  "exclude": {
   "isModifiable": true,
   "audiences": [],
   "criteria": [
    {
     "type": "KEYWORDS",
     "data": [
      {
       "externalId": "[externalId redacted]",
       "name": "[name redacted]"
      }
     ]
    }
   ]
  }
 },
 "activeExperiments": false,
 "locked": false,
 "createdDate": "2026-09-03T22:16:30.000Z"
}

Other audiences tools:

All 160 tools · machine-readable index