Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

list_dataverse_publishers

Retrieve publishers from Dataverse to discover available publishers, find custom publishers for solution creation, or view publisher configurations with customization prefixes.

Instructions

Retrieves a list of publishers in the Dataverse environment with filtering options. Use this to discover available publishers, find custom publishers for solution creation, or get an overview of publisher configurations including customization prefixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customOnlyNoWhether to list only custom publishers
topNoMaximum number of publishers to return

Implementation Reference

  • The main handler function for the 'list_dataverse_publishers' tool. It builds OData query parameters based on input (customOnly filter, top limit), fetches publishers from the Dataverse API, maps the response to a clean format, and returns a markdown-formatted list or error response.
    async (params) => { try { let queryParams: Record<string, any> = { $select: "friendlyname,uniquename,customizationprefix,customizationoptionvalueprefix,description,isreadonly" }; let filters: string[] = []; if (params.customOnly) { filters.push("isreadonly eq false"); } if (filters.length > 0) { queryParams.$filter = filters.join(" and "); } if (params.top) { queryParams.$top = params.top; } const result = await client.get('publishers', queryParams); const publisherList = result.value.map((publisher: any) => ({ friendlyName: publisher.friendlyname, uniqueName: publisher.uniquename, customizationPrefix: publisher.customizationprefix, customizationOptionValuePrefix: publisher.customizationoptionvalueprefix, description: publisher.description, isReadOnly: publisher.isreadonly })); return { content: [ { type: "text", text: `Found ${publisherList.length} publishers:\n\n${JSON.stringify(publisherList, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error listing publishers: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Zod input schema defining parameters for the tool: customOnly (boolean, defaults to true for custom publishers only), top (optional number for pagination).
    inputSchema: { customOnly: z.boolean().default(true).describe("Whether to list only custom publishers"), top: z.number().optional().describe("Maximum number of publishers to return") }
  • The server.registerTool call within listPublishersTool function that registers the 'list_dataverse_publishers' tool, including its title, description, input schema, and handler reference.
    server.registerTool( "list_dataverse_publishers", { title: "List Dataverse Publishers", description: "Retrieves a list of publishers in the Dataverse environment with filtering options. Use this to discover available publishers, find custom publishers for solution creation, or get an overview of publisher configurations including customization prefixes.", inputSchema: { customOnly: z.boolean().default(true).describe("Whether to list only custom publishers"), top: z.number().optional().describe("Maximum number of publishers to return") } }, async (params) => { try { let queryParams: Record<string, any> = { $select: "friendlyname,uniquename,customizationprefix,customizationoptionvalueprefix,description,isreadonly" }; let filters: string[] = []; if (params.customOnly) { filters.push("isreadonly eq false"); } if (filters.length > 0) { queryParams.$filter = filters.join(" and "); } if (params.top) { queryParams.$top = params.top; } const result = await client.get('publishers', queryParams); const publisherList = result.value.map((publisher: any) => ({ friendlyName: publisher.friendlyname, uniqueName: publisher.uniquename, customizationPrefix: publisher.customizationprefix, customizationOptionValuePrefix: publisher.customizationoptionvalueprefix, description: publisher.description, isReadOnly: publisher.isreadonly })); return { content: [ { type: "text", text: `Found ${publisherList.length} publishers:\n\n${JSON.stringify(publisherList, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error listing publishers: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • src/index.ts:172-172 (registration)
    Invocation of listPublishersTool in the main index.ts file, which triggers the registration of the tool on the MCP server instance.
    listPublishersTool(server, dataverseClient);

Other Tools

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/mwhesse/mcp-dataverse'

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