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​

The table below lists the tools that MCP uses in this tutorial, with links to their API documentation. For every Inventory API tool available in MCP, see the Inventory API section of the Tools index.

Tool nameDescriptionDocumentation
addPMPDealCreate a new PMP dealCreate PMP deal
getPMPDealListGet a paginated list of PMP dealsGet PMP deals list
editPMPDealEdit an existing PMP dealUpdate PMP deal
deletePMPDealDelete one or more PMP dealsDelete PMP deal
addPGDealCreate a new PG dealCreate PG deal
fetchPGDealListGet a paginated list of PG dealsGet PG deals list
managePgDealCampaignMappingsBulk assign/de-assign PG deals to campaignsAssign PG deals
deletePGDealsDelete multiple PG deals by their IDsDelete PG deal
addInventoryGroupCreate a new inventory groupCreate a new inventory group
addMappingsToInventoryGroupsAdd inventories to one or more inventory groupsAdd or remove mappings to an inventory group
removeMappingsOfInventoryGroupRemove inventories from an inventory groupAdd or remove mappings to an inventory group
includeExcludeInventoryGroupInclude or exclude campaigns from one or more inventory groupsInclude/exclude campaigns from inventory groups
Have a question?
Was this page helpful?