Skip to main content
Glama

get-global-option-set

Retrieve global option set definitions by name to access standardized data values in PowerPlatform/Dataverse environments.

Instructions

Get a global option set definition by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionSetNameYesThe name of the global option set

Implementation Reference

  • The handler function that executes the tool: initializes PowerPlatformService, calls getGlobalOptionSet, formats as JSON text response, handles errors.
    async ({ optionSetName }) => { try { // Get or initialize PowerPlatformService const service = getPowerPlatformService(); const optionSet = await service.getGlobalOptionSet(optionSetName); // Format the option set as a string for text display const optionSetStr = JSON.stringify(optionSet, null, 2); return { content: [ { type: "text", text: `Global option set '${optionSetName}':\n\n${optionSetStr}`, }, ], }; } catch (error: any) { console.error("Error getting global option set:", error); return { content: [ { type: "text", text: `Failed to get global option set: ${error.message}`, }, ], }; } }
  • Zod input schema defining the required 'optionSetName' parameter.
    { optionSetName: z.string().describe("The name of the global option set"), },
  • src/index.ts:503-505 (registration)
    Registration of the tool using server.tool() with name, description, and schema reference.
    server.tool( "get-global-option-set", "Get a global option set definition by name",
  • Helper method in PowerPlatformService that makes the API request to fetch the global option set metadata by name.
    async getGlobalOptionSet(optionSetName: string): Promise<any> { return this.makeRequest(`api/data/v9.2/GlobalOptionSetDefinitions(Name='${optionSetName}')`); }

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/michsob/powerplatform-mcp'

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