Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Set AutoNumber Seed

set_autonumber_seed

Set the starting number for an AutoNumber column in Dataverse to control sequential numbering for future records in your table.

Instructions

Sets the seed value for an AutoNumber column's sequential segment using the SetAutoNumberSeed action. This controls the starting number for future records. Note: Seed values are environment-specific and not included in solutions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnLogicalNameYesLogical name of the AutoNumber column
entityLogicalNameYesLogical name of the table containing the AutoNumber column
seedValueYesNext sequential number to use (e.g., 10000 to start from 10000)

Implementation Reference

  • The main handler implementation for the 'set_autonumber_seed' tool. It registers the tool with MCP server, defines the input schema, and executes the Dataverse 'SetAutoNumberSeed' action to set the sequential seed value.
    export function setAutoNumberSeedTool(server: McpServer, client: DataverseClient) {
      server.registerTool(
        'set_autonumber_seed',
        {
          title: 'Set AutoNumber Seed',
          description: 'Sets the seed value for an AutoNumber column\'s sequential segment using the SetAutoNumberSeed action. This controls the starting number for future records. Note: Seed values are environment-specific and not included in solutions.',
          inputSchema: {
            entityLogicalName: z.string().describe('Logical name of the table containing the AutoNumber column'),
            columnLogicalName: z.string().describe('Logical name of the AutoNumber column'),
            seedValue: z.number().int().min(1).describe('Next sequential number to use (e.g., 10000 to start from 10000)')
          }
        },
        async (params) => {
          try {
            // Use the SetAutoNumberSeed action
            const actionData = {
              "EntityLogicalName": params.entityLogicalName,
              "AttributeLogicalName": params.columnLogicalName,
              "Value": params.seedValue
            };
    
            await client.post('SetAutoNumberSeed', actionData);
    
            return {
              content: [
                {
                  type: "text",
                  text: `Successfully set AutoNumber seed for column '${params.columnLogicalName}' in table '${params.entityLogicalName}'.\n\nSeed Value: ${params.seedValue}\n\nNote: Seed value only affects future records and is environment-specific (not included in solutions).`
                }
              ]
            };
    
          } catch (error: any) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error setting AutoNumber seed: ${error instanceof Error ? error.message : 'Unknown error'}`
                }
              ],
              isError: true
            };
          }
        }
      );
    }
  • Zod input schema defining parameters: entityLogicalName (string), columnLogicalName (string), seedValue (integer >=1).
    inputSchema: {
      entityLogicalName: z.string().describe('Logical name of the table containing the AutoNumber column'),
      columnLogicalName: z.string().describe('Logical name of the AutoNumber column'),
      seedValue: z.number().int().min(1).describe('Next sequential number to use (e.g., 10000 to start from 10000)')
    }
  • src/index.ts:242-242 (registration)
    Invocation of setAutoNumberSeedTool which registers the 'set_autonumber_seed' tool with the MCP server.
    setAutoNumberSeedTool(server, dataverseClient);
  • src/index.ts:100-106 (registration)
    Import of setAutoNumberSeedTool from autonumber-tools.js enabling its registration.
      createAutoNumberColumnTool,
      updateAutoNumberFormatTool,
      setAutoNumberSeedTool,
      getAutoNumberColumnTool,
      listAutoNumberColumnsTool,
      convertToAutoNumberTool
    } from "./tools/autonumber-tools.js";
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that this is a mutation tool ('Sets'), mentions environment-specific behavior and solution exclusion, but doesn't cover permission requirements, rate limits, or what happens to existing records. It adds some behavioral context but leaves significant gaps for a mutation operation.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that each add value: the first states the core purpose, the second provides important behavioral context. It's front-loaded with the main action and avoids unnecessary repetition.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description provides basic purpose and some behavioral context but lacks details about permissions, error conditions, or response format. It's minimally adequate but has clear gaps given the tool's complexity and mutation nature.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

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 specific action ('Sets the seed value'), identifies the target resource ('AutoNumber column's sequential segment'), and distinguishes it from siblings like 'update_autonumber_format' or 'create_autonumber_column' by focusing on seed configuration rather than format creation or modification.

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

Usage Guidelines3/5

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

The description implies usage context through 'controls the starting number for future records' and notes environment-specific behavior, but doesn't explicitly state when to use this versus alternatives like 'update_autonumber_format' or mention prerequisites. It provides some guidance but lacks explicit when/when-not instructions.

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