Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Get Solution Context

get_solution_context

Check which solution is currently active for metadata operations and verify the customization prefix being used for new components in Dataverse.

Instructions

Retrieves the currently active solution context information. Use this to check which solution is currently set for metadata operations and to verify the customization prefix being used for new components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The getSolutionContextTool function implements and registers the 'get_solution_context' MCP tool. It defines the tool schema (empty input) and the handler logic that calls client.getSolutionContext() to retrieve the current solution context and formats it into a response.
    export function getSolutionContextTool(server: McpServer, client: DataverseClient) {
      server.registerTool(
        "get_solution_context",
        {
          title: "Get Solution Context",
          description: "Retrieves the currently active solution context information. Use this to check which solution is currently set for metadata operations and to verify the customization prefix being used for new components.",
          inputSchema: {}
        },
        async () => {
          try {
            const currentContext = client.getSolutionContext();
            
            if (!currentContext) {
              return {
                content: [
                  {
                    type: "text",
                    text: "No solution context is currently set. Metadata operations will not be associated with any specific solution."
                  }
                ]
              };
            }
    
            return {
              content: [
                {
                  type: "text",
                  text: `Current solution context: '${currentContext.solutionUniqueName}' (${currentContext.solutionDisplayName})\n\nPublisher: ${currentContext.publisherDisplayName} (${currentContext.publisherUniqueName})\nPrefix: ${currentContext.customizationPrefix}\n\nAll metadata operations will be associated with this solution.\nLast updated: ${currentContext.lastUpdated}`
                }
              ]
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error getting solution context: ${error instanceof Error ? error.message : 'Unknown error'}`
                }
              ],
              isError: true
            };
          }
        }
      );
    }
  • src/index.ts:176-176 (registration)
    Invocation of getSolutionContextTool to register the tool with the MCP server during initialization.
    getSolutionContextTool(server, dataverseClient);
  • Core helper method in DataverseClient that returns the persisted SolutionContext or null if none set.
    getSolutionContext(): SolutionContext | null {
      return this.solutionContext;
    }
  • TypeScript interface defining the structure of SolutionContext returned by getSolutionContext() and used in tool responses.
    export interface SolutionContext {
      solutionUniqueName: string;
      solutionDisplayName?: string;
      publisherUniqueName?: string;
      publisherDisplayName?: string;
      customizationPrefix?: string;
      lastUpdated: string;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a read-only operation ('retrieves', 'check', 'verify') and specifies what information is returned ('solution context', 'customization prefix'). However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly front-loaded with the core purpose in the first sentence and provides additional usage context in the second. Both sentences earn their place by adding distinct value, and there's no wasted language or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read operation with no annotations and no output schema, the description does a good job explaining what the tool does and when to use it. However, without an output schema, it could benefit from more detail about the return format or structure of the solution context information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline would be 3. The description adds value by explaining the semantic purpose of the tool's output ('check which solution is currently set', 'verify the customization prefix'), which goes beyond what the empty schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('retrieves', 'check', 'verify') and resources ('currently active solution context information', 'solution', 'customization prefix'). It distinguishes itself from siblings like 'set_solution_context' and 'clear_solution_context' by focusing on retrieval rather than modification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('to check which solution is currently set for metadata operations and to verify the customization prefix'), but it doesn't explicitly state when not to use it or name specific alternatives. It implies usage for verification purposes without detailing exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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