Skip to main content
Glama
moneyforward-i

Admina MCP Server

create_identity_custom_field

Creates a new custom field for identities, defining a text, number, date, dropdown, or email field to standardize identity data across the organization.

Instructions

Create a new identity custom field for an organization. Defines a new field that can be used across all identities in the organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesThe type of the custom field (REQUIRED)
configurationNoDropdown configuration (values can be added, removed, reordered, or modified). Only required for dropdown type fields.
attributeNameYesDisplay label for the custom field (REQUIRED)
attributeCodeYesUnique identifier for the custom field. Must contain only lowercase letters, numbers, and underscores. If not provided, will be auto-generated.
serviceSourceNoOptional service source to link this custom field to a specific service workspace.

Implementation Reference

  • The main handler function that creates an identity custom field by making a POST API call to /identity/fields/custom. It constructs a body with kind, attributeName, attributeCode, optional dropdown configuration, and optional serviceSource.
    export async function createIdentityCustomField(params: CreateIdentityCustomFieldParams) {
      const client = getClient();
    
      const body: Record<string, unknown> = {
        kind: params.kind,
        attributeName: params.attributeName,
        attributeCode: params.attributeCode,
        configuration: params.kind === "dropdown" ? params.configuration : null,
      };
    
      if (params.serviceSource) {
        body.serviceSource = {
          serviceFieldId: params.serviceSource.serviceFieldId,
          workspaceId: params.serviceSource.workspaceId,
        };
      }
    
      return client.makePostApiCall("/identity/fields/custom", new URLSearchParams(), body);
    }
  • Zod schema defining the input parameters for create_identity_custom_field: kind (enum), configuration (dropdown schema), attributeName, attributeCode, and optional serviceSource.
    export const CreateIdentityCustomFieldSchema = z.object({
      kind: z
        .enum(["text", "textarea", "number", "date", "dropdown", "email"])
        .describe("The type of the custom field (REQUIRED)"),
      configuration: DropdownConfigurationSchema.describe(
        "Dropdown items with id (stable identifier) and value (display name) (REQUIRED)",
      )
        .optional()
        .describe(
          "Dropdown configuration (values can be added, removed, reordered, or modified). Only required for dropdown type fields.",
        ),
      attributeName: z.string().describe("Display label for the custom field (REQUIRED)"),
      attributeCode: z
        .string()
        .describe(
          "Unique identifier for the custom field. Must contain only lowercase letters, numbers, and underscores. If not provided, will be auto-generated.",
        ),
      serviceSource: z
        .object({
          serviceFieldId: z
            .string()
            .describe(
              "Display label for the custom field (REQUIRED). This can be obtained as workspaceId of workspace of service field from get_services tool and user should pick a service then pick a workspace from the list of workspaces for that service and use that workspaceId for this field",
            ),
          workspaceId: z
            .number()
            .describe("Workspace ID number for the service source. This can be obtained from the get_services tool."),
        })
        .optional()
        .describe("Optional service source to link this custom field to a specific service workspace."),
    });
  • src/index.ts:272-277 (registration)
    Registration of the tool in the ListToolsRequestSchema handler with name 'create_identity_custom_field' and description.
    {
      name: "create_identity_custom_field",
      description:
        "Create a new identity custom field for an organization. Defines a new field that can be used across all identities in the organization.",
      inputSchema: zodToJsonSchema(CreateIdentityCustomFieldSchema),
    },
  • src/index.ts:328-329 (registration)
    Handler mapping in the toolHandlers object that routes 'create_identity_custom_field' to the createIdentityCustomField function.
    create_identity_custom_field: async (input) =>
      createIdentityCustomField(CreateIdentityCustomFieldSchema.parse(input)),
  • DropdownConfigurationSchema helper used by CreateIdentityCustomFieldSchema to validate dropdown configuration values.
    import z from "zod";
    
    // Dropdown value schema
    export const DropdownValueSchema = z.object({
      id: z.string().describe("Stable identifier for the option"),
      value: z.string().describe("Display name for the option"),
      group: z.string().optional().describe("Optional group for the option"),
    });
    
    // Dropdown configuration schema
    export const DropdownConfigurationSchema = z.object({
      values: z.array(DropdownValueSchema).describe("Dropdown items with id (stable identifier) and value (display name)"),
    });
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only says 'create', implying mutation, but lacks details on idempotency, permissions, limits, or consequences of duplicate attributeCode. The auto-generation of attributeCode is not mentioned.

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?

Two sentences, no redundancy. It is appropriately front-loaded with the main action. However, it could be slightly more structured by hinting at parameters without becoming verbose.

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 tool's complexity (5 parameters, nested objects, no output schema), the description is too sparse. It does not mention that dropdown fields require configuration, nor does it explain the return value. With no annotations, the description falls short of providing a complete picture.

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 coverage is 100%, so baseline is 3. The description adds no parameter-level explanation beyond what the schema already provides. For a tool with nested objects, extra context could help, but the schema itself is well-documented.

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

Purpose4/5

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

The description clearly states the action (create) and the resource (identity custom field for an organization). It also explains the scope: usable across all identities in the org. This differentiates it from siblings like 'update_identity_custom_field' or 'delete_identity_custom_field'.

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

Usage Guidelines2/5

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

No usage guidelines provided. There is no indication of when to use this tool versus alternatives like 'create_device_custom_field' or when to update an existing field. The description does not help the agent decide.

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