Skip to main content

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:

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​

Create a PMP deal​

You can use IQM MCP to create a PMP deal by providing the required details and settings.

PromptResponse exampleNotes
Help me create a new PMP dealMCP prompts user for PMP deal details and settings.
Show me a list of PMP deals
Delete PMP deal 2349MCP 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.

PromptResponse exampleNotes
Help me create a new PG dealMCP prompts user for PG deal details and settings.
Show me a list of PG deals
Assign PGdeal1 to campaign 594259MCP assigns PG deal to the specified campaign.
Delete PG deals 1934 and 1933MCP deletes the specified PG deals.

Create an inventory group​

You can use IQM MCP to create an inventory group and add inventory to it.

PromptResponse exampleNotes
I want to create an inventory group of PMP dealsMCP prompts user for inventory group details and deal IDs to add to it.
Update that group. Remove PMP deal 449 and add 1587 and 1757MCP updates the mapping of deals to the inventory group.
I want to create a new inventory group using Contextual inventoriesMCP 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, 12MCP creates an inventory group with the specified filters.
Assign Filter Group 1 to the following campaigns: 594254, 594256, 594257MCP 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 nameDescriptionDocumentation
addPMPDealCreate a new PMP dealCreate PMP deal
editPMPDealEdit an existing PMP dealUpdate PMP deal
deletePMPDealDelete one or more PMP dealsDelete PMP deal
getPMPDealDetailsGet PMP deal details including assigned campaign IDsGet PMP deal details by IDs
getPMPDealListGet a paginated list of PMP dealsGet PMP deals list
getPMPDealsCountByStatusGet count of PMP deals by statusGet count of PMP deals for all statuses
getPMPAndPGDealsGet a list of PMP and PG deals for report filteringList of deals
getGroupPMPDealsGet PMP deals in an inventory groupGet list of PMP deals in an inventory group
generateGroupPMPDealsFileDownload a CSV of PMP deal details for a groupGet CSV list of PMP deals in an inventory group
fetchAssociatedCustomersForPMPDealGet customers associated with a PMP deal's campaignsGet list of Customers associated with campaigns for a PMP deal
getDealStatusesGet a list of deal statusesGet list of deal statuses
getDealTypesGet a list of deal typesGet list of deal types

PG deals​

Tool nameDescriptionDocumentation
addPGDealCreate a new PG dealCreate PG deal
updatePGDealUpdate an existing PG dealUpdate PG deal details
deletePGDealsDelete multiple PG deals by their IDsDelete PG deal
fetchPGDealListGet a paginated list of PG dealsGet PG deals list
getPGDealByIdGet PG deal details with associated campaign IDsGet PG deals details by ID

Inventory groups​

Tool nameDescriptionDocumentation
addInventoryGroupCreate a new inventory groupCreate a new inventory group
editInventoryGroupEdit an existing inventory groupEdit inventory group
deleteInventoryGroupDelete an inventory groupDelete inventory group
validateInventoryGroupValidate an inventory group nameValidate inventory group
getInventoryGroupsGet a paginated list of inventory groupsGet list of inventory groups
getInventoryGroupsCountGet the count of inventory groupsGet inventory groups count
getInventoryGroupsStatisticsGet aggregate statistics for inventory groupsGet list of inventory groups statistics
getInventoryGroupTypesGet a list of inventory group typesGet inventory group types
addMappingsToInventoryGroupsAdd inventories to one or more inventory groupsAdd or remove mappings to an inventory group
removeMappingsOfInventoryGroupRemove inventories from an inventory group
includeExcludeInventoryInclude or exclude inventory for a campaignCampaign inventory targeting

Open Exchange inventories​

Tool nameDescriptionDocumentation
getInventoriesDetailsGet open exchange inventory details with filteringGet list of inventories
getInventoriesCountDetailsGet count of open exchange inventoriesGet inventories count
getInventoriesDistributionDetailsGet distribution of inventories across dimensionsGet inventory distribution
getInventoriesByCSVGet inventories based on an uploaded CSV fileGet inventory based on CSV file
getInventoriesCountByCSVGet inventory counts based on an uploaded CSV fileGet inventory count based on CSV file
getInventoriesDistributionsByCSVGet inventory distributions based on an uploaded CSV fileGet distribution of inventory based on CSV file
getGroupInventoriesGet open exchange inventories in a groupGet list of Open Exchange inventories in an inventory group
getGroupInventoriesStatisticsGet statistics for inventories in a groupGet count of Open Exchange inventories in an inventory group
getGroupInventoriesDistributionsGet distribution breakdown of inventories in a groupGet distributions of Open Exchange inventories in an inventory group
downloadOpenExchangeInventoryDetailsDownload open exchange inventory detailsDownload CSV inventory list
downloadOpenExchangeInventoryDetailsByGroupIdDownload open exchange inventory details for a groupDownload Open Exchange inventories for group

Contextual inventories​

Tool nameDescriptionDocumentation
addContextualInventoriesAdd contextual inventories with keywords and URLsAdd Contextual inventories
removeContextualInventoriesRemove contextual inventoriesRemove Contextual inventories
getContextualInventoriesGet a paginated list of contextual inventoriesFetch Contextual inventories
addMappingsToInventoryGroups_1Add contextual inventory mappings to one or more inventory groupsAdd Contextual inventories to inventory groups
removeMappingsFromInventoryGroupRemove contextual inventory mappings from an inventory groupRemove Contextual inventories from group
getContextualInventoriesForGroupGet contextual inventories for a groupGet list of Contextual inventories for an inventory group
getContextualInventoriesForGroupCountGet count of contextual inventories for a groupGet count of Contextual inventories for an inventory group
generateGroupContextualInventoriesFileDownload contextual inventories CSV for a groupGet CSV file of Contextual inventories for an inventory group
getRecommendedKeywordsGet recommended keywords for contextual targetingContextual inventory
getAutoSuggestKeywordsGet autosuggested keywords for contextual targeting

Blocked inventories​

Tool nameDescriptionDocumentation
addInventoriesToBlockedListAdd inventories to the blocked listBlock inventories
blockInventoriesToBlockedListViaFileBlock inventories via an uploaded fileBlock inventory file
unblockInventoriesFromBlockedListRemove inventories from the blocked listUnblock inventories
getBlockedInventoriesGet list of blocked open exchange inventoriesGet list of blocked inventories
addCommentForInventoryBlockingAdd a comment for a blocked inventoryAdd comment for blocked inventory
Have a question?
Was this page helpful?