Skip to main content
Glama
moneyforward-i

Admina MCP Server

merge_identities

Batch merge multiple people or identity entities into one. Combine duplicate records by specifying source and target IDs for up to 50 merges per request.

Instructions

Merge identities in batch. Use this to merge multiple people entities or identity entities. Supports up to 50 merge operations per request. Can merge people entities (by peopleId) or identity entities (by identityId) in a single operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mergesNoArray of people merge operations (1-50 items)
identityMergesNoArray of identity merge operations (1-50 items)

Implementation Reference

  • The main handler function that calls the API to merge identities. Accepts optional 'merges' (people merges) and 'identityMerges' (identity merges) arrays, sends them to POST /identity/merge.
    export async function mergeIdentities(params: MergeIdentitiesParams) {
      const client = getClient();
    
      const body: Record<string, unknown> = {};
    
      if (params.merges !== undefined) {
        body.merges = params.merges;
      }
    
      if (params.identityMerges !== undefined) {
        body.identityMerges = params.identityMerges;
      }
    
      return client.makePostApiCall("/identity/merge", new URLSearchParams(), body);
    }
  • The exported input schema (MergeIdentitiesSchema) defining the shape of the tool input: optional 'merges' array (1-50 MergePeople objects) and optional 'identityMerges' array (1-50 MergeIdentity objects).
    export const MergeIdentitiesSchema = z.object({
      merges: z
        .array(MergePeopleSchema)
        .min(1)
        .max(50)
        .optional()
        .describe("Array of people merge operations (1-50 items)"),
      identityMerges: z
        .array(MergeIdentitySchema)
        .min(1)
        .max(50)
        .optional()
        .describe("Array of identity merge operations (1-50 items)"),
    });
  • Helper schema for people merge operations: fromPeopleId and toPeopleId (both positive numbers).
    const MergePeopleSchema = z.object({
      fromPeopleId: z.number().positive().describe("Source people ID to merge from"),
      toPeopleId: z.number().positive().describe("Target people ID to merge into"),
    });
  • Helper schema for identity merge operations: fromIdentityId and toIdentityId (both strings).
    const MergeIdentitySchema = z.object({
      fromIdentityId: z.string().describe("Source identity ID to merge from"),
      toIdentityId: z.string().describe("Target identity ID to merge into"),
    });
  • src/index.ts:236-241 (registration)
    Tool registration with name 'merge_identities', description, and inputSchema reference.
    {
      name: "merge_identities",
      description:
        "Merge identities in batch. Use this to merge multiple people entities or identity entities. Supports up to 50 merge operations per request. Can merge people entities (by peopleId) or identity entities (by identityId) in a single operation.",
      inputSchema: zodToJsonSchema(MergeIdentitiesSchema),
    },
  • src/index.ts:322-322 (registration)
    Handler registration mapping the 'merge_identities' tool name to the mergeIdentities function with schema validation.
    merge_identities: async (input) => mergeIdentities(MergeIdentitiesSchema.parse(input)),
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It mentions batching and a 50-operation limit, but fails to describe destructive effects (source entities likely deleted), required permissions, or error handling. This is a significant gap for a merge tool.

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 three concise sentences, each conveying essential information: the action, use case, and size limit. No redundant or extraneous text.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description should provide more context about return values, error conditions, or success behavior. It only mentions operation limits but omits what happens on success or failure, making it incomplete for a batch mutation tool.

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?

The input schema covers 100% of parameters with descriptions. The description adds context about merging two types of entities (people and identity), which complements the schema but does not add substantial new meaning beyond what the schema already 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 action ('merge') and the resource ('identities'), specifying both people and identity entities. It distinguishes from sibling tools like unmerge_identities and update_identity by explicitly mentioning batch merging of multiple entities.

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 a clear use case ('Use this to merge multiple people entities or identity entities') and a key constraint ('Supports up to 50 merge operations per request'). However, it does not explicitly state when not to use it or mention alternatives like update_identity for single operations.

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/moneyforward-i/admina-mcp-server'

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