MCP inventory tutorial
Use IQM Model Context Protocol (MCP) to interact with the Inventory API.
Overview
This tutorial guides you through using IQM MCP to retrieve and manage inventory details for your campaigns. You learn how to create and manage deals, assign them to campaigns, and create inventory groups using the MCP interface.
Before you begin
To create a deal or inventory group, the following are required:
- An account on the IQM platform
- See Before you begin to create an account and request a Client ID and Client Secret
- A campaign
- See Create a campaign quickstart guide
- See Create a PG campaign tutorial
- Required for assigning a deal/group to a campaign
About IQM inventory
The Inventory API allows you to manage inventory details for your campaigns, including creating and managing deals, assigning them to campaigns, and creating inventory groups.
More resources
- Inventory API guidelines
- Create a deal tutorial
- Optimize your inventory tutorial
- Ad inventory and placements Help Center article
Create a PMP deal
You can use IQM MCP to create a PMP deal by providing the required details and settings.
| Prompt | Response example | Notes |
|---|---|---|
| Help me create a new PMP deal | MCP prompts user for PMP deal details and settings. | |
| Show me a list of PMP deals | ||
| Delete PMP deal 2349 | MCP updates PMP deal's status to 'inactive' and then deletes it. |
Create a PG deal
You can also use IQM MCP to create a PG deal by providing the required details and settings.
| Prompt | Response example | Notes |
|---|---|---|
| Help me create a new PG deal | MCP prompts user for PG deal details and settings. | |
| Show me a list of PG deals | ||
| Assign PGdeal1 to campaign 594259 | MCP assigns PG deal to the specified campaign. | |
| Delete PG deals 1934 and 1933 | MCP deletes the specified PG deals. |
Create an inventory group
You can use IQM MCP to create an inventory group and add inventory to it.
| Prompt | Response example | Notes |
|---|---|---|
| I want to create an inventory group of PMP deals | MCP prompts user for inventory group details and deal IDs to add to it. | |
| Update that group. Remove PMP deal 449 and add 1587 and 1757 | MCP updates the mapping of deals to the inventory group. | |
| I want to create a new inventory group using Contextual inventories | MCP prompts user for Contextual inventory details and keywords to add to the group. | |
| Create an inventory group with the following filters: country id: 30100001 category: IAB1 exchanges: 47,48 traffictypes: 11, 12 | MCP creates an inventory group with the specified filters. | |
| Assign Filter Group 1 to the following campaigns: 594254, 594256, 594257 | MCP uses a campaign targeting tool to assign the inventory group. See the campaign Tools index for more information. |
Tools index
In the tables below you can find the complete set of inventory tools available in MCP, categorized by entity types.
Each tool includes a brief description and a link to the corresponding API documentation for more details on its functionality and usage.
Use this index as a reference to explore the various inventory management capabilities of MCP and how they relate to the Inventory API endpoints.
PMP deals
| Tool name | Description | Documentation |
|---|---|---|
addPMPDeal | Create a new PMP deal | Create PMP deal |
editPMPDeal | Edit an existing PMP deal | Update PMP deal |
deletePMPDeal | Delete one or more PMP deals | Delete PMP deal |
getPMPDealDetails | Get PMP deal details including assigned campaign IDs | Get PMP deal details by IDs |
getPMPDealList | Get a paginated list of PMP deals | Get PMP deals list |
getPMPDealsCountByStatus | Get count of PMP deals by status | Get count of PMP deals for all statuses |
getPMPAndPGDeals | Get a list of PMP and PG deals for report filtering | List of deals |
getGroupPMPDeals | Get PMP deals in an inventory group | Get list of PMP deals in an inventory group |
generateGroupPMPDealsFile | Download a CSV of PMP deal details for a group | Get CSV list of PMP deals in an inventory group |
fetchAssociatedCustomersForPMPDeal | Get customers associated with a PMP deal's campaigns | Get list of Customers associated with campaigns for a PMP deal |
getDealStatuses | Get a list of deal statuses | Get list of deal statuses |
getDealTypes | Get a list of deal types | Get list of deal types |
PG deals
| Tool name | Description | Documentation |
|---|---|---|
addPGDeal | Create a new PG deal | Create PG deal |
updatePGDeal | Update an existing PG deal | Update PG deal details |
deletePGDeals | Delete multiple PG deals by their IDs | Delete PG deal |
fetchPGDealList | Get a paginated list of PG deals | Get PG deals list |
getPGDealById | Get PG deal details with associated campaign IDs | Get PG deals details by ID |
Inventory groups
| Tool name | Description | Documentation |
|---|---|---|
addInventoryGroup | Create a new inventory group | Create a new inventory group |
editInventoryGroup | Edit an existing inventory group | Edit inventory group |
deleteInventoryGroup | Delete an inventory group | Delete inventory group |
validateInventoryGroup | Validate an inventory group name | Validate inventory group |
getInventoryGroups | Get a paginated list of inventory groups | Get list of inventory groups |
getInventoryGroupsCount | Get the count of inventory groups | Get inventory groups count |
getInventoryGroupsStatistics | Get aggregate statistics for inventory groups | Get list of inventory groups statistics |
getInventoryGroupTypes | Get a list of inventory group types | Get inventory group types |
addMappingsToInventoryGroups | Add inventories to one or more inventory groups | Add or remove mappings to an inventory group |
removeMappingsOfInventoryGroup | Remove inventories from an inventory group | |
includeExcludeInventory | Include or exclude inventory for a campaign | Campaign inventory targeting |
Open Exchange inventories
| Tool name | Description | Documentation |
|---|---|---|
getInventoriesDetails | Get open exchange inventory details with filtering | Get list of inventories |
getInventoriesCountDetails | Get count of open exchange inventories | Get inventories count |
getInventoriesDistributionDetails | Get distribution of inventories across dimensions | Get inventory distribution |
getInventoriesByCSV | Get inventories based on an uploaded CSV file | Get inventory based on CSV file |
getInventoriesCountByCSV | Get inventory counts based on an uploaded CSV file | Get inventory count based on CSV file |
getInventoriesDistributionsByCSV | Get inventory distributions based on an uploaded CSV file | Get distribution of inventory based on CSV file |
getGroupInventories | Get open exchange inventories in a group | Get list of Open Exchange inventories in an inventory group |
getGroupInventoriesStatistics | Get statistics for inventories in a group | Get count of Open Exchange inventories in an inventory group |
getGroupInventoriesDistributions | Get distribution breakdown of inventories in a group | Get distributions of Open Exchange inventories in an inventory group |
downloadOpenExchangeInventoryDetails | Download open exchange inventory details | Download CSV inventory list |
downloadOpenExchangeInventoryDetailsByGroupId | Download open exchange inventory details for a group | Download Open Exchange inventories for group |
Contextual inventories
| Tool name | Description | Documentation |
|---|---|---|
addContextualInventories | Add contextual inventories with keywords and URLs | Add Contextual inventories |
removeContextualInventories | Remove contextual inventories | Remove Contextual inventories |
getContextualInventories | Get a paginated list of contextual inventories | Fetch Contextual inventories |
addMappingsToInventoryGroups_1 | Add contextual inventory mappings to one or more inventory groups | Add Contextual inventories to inventory groups |
removeMappingsFromInventoryGroup | Remove contextual inventory mappings from an inventory group | Remove Contextual inventories from group |
getContextualInventoriesForGroup | Get contextual inventories for a group | Get list of Contextual inventories for an inventory group |
getContextualInventoriesForGroupCount | Get count of contextual inventories for a group | Get count of Contextual inventories for an inventory group |
generateGroupContextualInventoriesFile | Download contextual inventories CSV for a group | Get CSV file of Contextual inventories for an inventory group |
getRecommendedKeywords | Get recommended keywords for contextual targeting | Contextual inventory |
getAutoSuggestKeywords | Get autosuggested keywords for contextual targeting |
Blocked inventories
| Tool name | Description | Documentation |
|---|---|---|
addInventoriesToBlockedList | Add inventories to the blocked list | Block inventories |
blockInventoriesToBlockedListViaFile | Block inventories via an uploaded file | Block inventory file |
unblockInventoriesFromBlockedList | Remove inventories from the blocked list | Unblock inventories |
getBlockedInventories | Get list of blocked open exchange inventories | Get list of blocked inventories |
addCommentForInventoryBlocking | Add a comment for a blocked inventory | Add comment for blocked inventory |