get_publisher_by_domain
Retrieve detailed publisher information for a domain, including performance metrics, supply chain data, and field explanations to analyze digital advertising operations.
Instructions
Get detailed publisher information by domain name with comprehensive metric descriptions. Returns formatted data including performance metrics, supply chain information, and detailed explanations of each field's meaning and business impact.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Publisher domain to search for |
Implementation Reference
- src/index.ts:169-192 (handler)MCP tool handler case for 'get_publisher_by_domain': parses input using schema, calls service method, formats result with descriptions, returns formatted text or error message.case 'get_publisher_by_domain': { const input = GetPublisherByDomainSchema.parse(request.params.arguments); const result = await openSinceraService.getPublisherByDomain(input.domain); if (result) { const formatted = formatPublisherWithDescriptions(result, 'en'); return { content: [ { type: 'text', text: formatted, }, ], }; } else { return { content: [ { type: 'text', text: `No publisher found for domain: ${input.domain}`, }, ], }; }
- src/index.ts:38-40 (schema)Zod input validation schema for get_publisher_by_domain tool: requires 'domain' as non-empty string.const GetPublisherByDomainSchema = z.object({ domain: z.string().min(1), });
- src/index.ts:94-108 (registration)Tool registration in listTools response: defines name, description, and inputSchema matching the Zod schema.{ name: 'get_publisher_by_domain', description: `Get detailed publisher information by domain name with comprehensive metric descriptions. Returns formatted data including performance metrics, supply chain information, and detailed explanations of each field's meaning and business impact.`, inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'Publisher domain to search for', }, }, required: ['domain'], additionalProperties: false, }, },
- src/opensincera-service.ts:272-281 (helper)Service helper method getPublisherByDomain: calls getPublisherMetadata with domain and limit 1, returns first publisher or null.async getPublisherByDomain(domain: string): Promise<PublisherMetadata | null> { try { const response = await this.getPublisherMetadata({ publisherDomain: domain, limit: 1 }); return response.publishers.length > 0 ? response.publishers[0] : null; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; console.error('Failed to get publisher by domain', { domain, error: errorMessage }); throw error; } }