Skip to main content
Glama
miyaichi

OpenSincera MCP Server

by miyaichi

get_publisher_by_id

Retrieve detailed publisher information including performance metrics, supply chain data, and field explanations by entering a Publisher ID.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publisherIdYesPublisher ID to search for

Implementation Reference

  • The main handler for the 'get_publisher_by_id' tool. Parses input using Zod schema, calls the OpenSinceraService to fetch publisher data, formats the result with descriptions, and returns formatted text content or error message if not found.
    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 schema for input validation of the get_publisher_by_id tool, ensuring publisherId is a non-empty string.
    const GetPublisherByIdSchema = z.object({ publisherId: z.string().min(1), });
  • src/index.ts:109-123 (registration)
    Tool registration in the listTools handler, defining name, description, and inputSchema for get_publisher_by_id.
    { 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, }, },
  • Helper method in OpenSinceraService that fetches publisher metadata by ID by calling getPublisherMetadata with limit 1 and returns the first result 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