get_dataverse_solution
Retrieve detailed solution information including metadata, version, publisher details, and configuration to inspect solution properties and understand solution structure in Microsoft Dataverse.
Instructions
Retrieves detailed information about a specific solution including its metadata, version, publisher details, and configuration. Use this to inspect solution properties and understand solution structure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uniqueName | Yes | Unique name of the solution to retrieve |
Implementation Reference
- src/tools/solution-tools.ts:143-172 (handler)The core handler function for the 'get_dataverse_solution' tool. It queries the Dataverse API for the solution by uniqueName using an OData filter and expand for publisher details, formats the response, and handles errors appropriately.async (params) => { try { const result = await client.get( `solutions?$filter=uniquename eq '${params.uniqueName}'&$expand=publisherid($select=friendlyname,uniquename,customizationprefix,customizationoptionvalueprefix)` ); if (!result.value || result.value.length === 0) { throw new Error(`Solution with unique name '${params.uniqueName}' not found`); } return { content: [ { type: "text", text: `Solution information for '${params.uniqueName}':\n\n${JSON.stringify(result.value[0], null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving solution: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
- src/tools/solution-tools.ts:136-142 (schema)The tool schema definition including title, description, and Zod inputSchema validating the uniqueName parameter.{ title: "Get Dataverse Solution", description: "Retrieves detailed information about a specific solution including its metadata, version, publisher details, and configuration. Use this to inspect solution properties and understand solution structure.", inputSchema: { uniqueName: z.string().describe("Unique name of the solution to retrieve") } },
- src/tools/solution-tools.ts:133-174 (registration)The exported getSolutionTool function that registers the 'get_dataverse_solution' MCP tool with the server, including schema and handler.export function getSolutionTool(server: McpServer, client: DataverseClient) { server.registerTool( "get_dataverse_solution", { title: "Get Dataverse Solution", description: "Retrieves detailed information about a specific solution including its metadata, version, publisher details, and configuration. Use this to inspect solution properties and understand solution structure.", inputSchema: { uniqueName: z.string().describe("Unique name of the solution to retrieve") } }, async (params) => { try { const result = await client.get( `solutions?$filter=uniquename eq '${params.uniqueName}'&$expand=publisherid($select=friendlyname,uniquename,customizationprefix,customizationoptionvalueprefix)` ); if (!result.value || result.value.length === 0) { throw new Error(`Solution with unique name '${params.uniqueName}' not found`); } return { content: [ { type: "text", text: `Solution information for '${params.uniqueName}':\n\n${JSON.stringify(result.value[0], null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving solution: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }
- src/index.ts:169-169 (registration)The invocation in the main index.ts that calls getSolutionTool to register the tool with the MCP server instance and Dataverse client.getSolutionTool(server, dataverseClient);