Skip to main content
Glama
miyaichi

OpenSincera MCP Server

by miyaichi

get_publisher_by_id

Retrieve detailed metadata, verification status, and operational metrics for a digital advertising publisher by specifying its unique Publisher ID using the OpenSincera MCP Server API.

Instructions

Get a single publisher by publisher ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publisherIdYesPublisher ID to search for

Implementation Reference

  • MCP CallToolRequest handler case for 'get_publisher_by_id': validates input schema, invokes OpenSinceraService.getPublisherById(), formats result with metadata descriptions or returns not-found message.
    case 'get_publisher_by_id': { const input = GetPublisherByIdSchema.parse(request.params.arguments); const result = await openSinceraService.getPublisherById(input.publisherId); if (result) { const formatted = formatPublisherWithDescriptions(result, 'en'); return { content: [ { type: 'text', text: formatted, }, ], }; } else { return { content: [ { type: 'text', text: `No publisher found for ID: ${input.publisherId}`, }, ], }; }
  • Zod input validation schema for get_publisher_by_id tool: requires publisherId string.
    const GetPublisherByIdSchema = z.object({ publisherId: z.string().min(1), });
  • src/index.ts:110-124 (registration)
    Tool registration in ListToolsRequest handler: defines name 'get_publisher_by_id', description, and JSON inputSchema matching the Zod schema.
    { name: 'get_publisher_by_id', description: `Get detailed publisher information by Publisher ID 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: { publisherId: { type: 'string', description: 'Publisher ID to search for', }, }, required: ['publisherId'], additionalProperties: false, }, },
  • OpenSinceraService helper method: retrieves publisher metadata by ID via internal getPublisherMetadata call, returns PublisherMetadata or null.
    async getPublisherById(publisherId: string): Promise<PublisherMetadata | null> { try { const response = await this.getPublisherMetadata({ publisherId, 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 ID', { publisherId, error: errorMessage }); throw error; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/miyaichi/opensincera-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server