get_publisher_by_domain
Retrieve publisher metadata, verification status, and operational metrics by searching with a specific domain name using the OpenSincera MCP Server API.
Instructions
Get a single publisher by domain name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Publisher domain to search for |
Implementation Reference
- src/opensincera-service.ts:266-275 (handler)The core handler function that retrieves publisher metadata by domain by calling the internal getPublisherMetadata method with domain and limit=1.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; } }
- src/index.ts:39-41 (schema)Zod schema for input validation of the get_publisher_by_domain tool, requiring a 'domain' string.const GetPublisherByDomainSchema = z.object({ domain: z.string().min(1), });
- src/index.ts:95-109 (registration)Tool registration in the ListTools handler, defining name, description, and input schema for get_publisher_by_domain.{ 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/index.ts:170-194 (handler)MCP server handler case that validates input with schema, calls the service handler, formats result with descriptions, and returns MCP content response.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}`, }, ], }; } }