Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

get_dataverse_optionset

Retrieve detailed metadata and configuration for specific Dataverse option sets to inspect available choices and understand field definitions.

Instructions

Retrieves detailed information about a specific option set including its metadata, options, and configuration. Use this to inspect option set definitions and understand available choices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the option set to retrieve

Implementation Reference

  • Handler function that executes the get_dataverse_optionset tool by fetching the option set metadata from Dataverse.
    async (params) => { try { const result = await client.getMetadata<OptionSetMetadata>( `GlobalOptionSetDefinitions(Name='${params.name}')` ); return { content: [ { type: "text", text: `Option set information for '${params.name}':\n\n${JSON.stringify(result, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving option set: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Schema definition for the get_dataverse_optionset tool, including title, description, and input schema.
    { title: "Get Dataverse Option Set", description: "Retrieves detailed information about a specific option set including its metadata, options, and configuration. Use this to inspect option set definitions and understand available choices.", inputSchema: { name: z.string().describe("Name of the option set to retrieve") } },
  • Registration of the get_dataverse_optionset tool via the getOptionSetTool function, which includes schema and handler.
    export function getOptionSetTool(server: McpServer, client: DataverseClient) { server.registerTool( "get_dataverse_optionset", { title: "Get Dataverse Option Set", description: "Retrieves detailed information about a specific option set including its metadata, options, and configuration. Use this to inspect option set definitions and understand available choices.", inputSchema: { name: z.string().describe("Name of the option set to retrieve") } }, async (params) => { try { const result = await client.getMetadata<OptionSetMetadata>( `GlobalOptionSetDefinitions(Name='${params.name}')` ); return { content: [ { type: "text", text: `Option set information for '${params.name}':\n\n${JSON.stringify(result, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving option set: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }

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