Skip to main content
Glama
moneyforward-i

Admina MCP Server

create_identity_custom_field

Create a new custom field to standardize identity data across your organization, supporting text, number, date, dropdown, and email types.

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. Builds a request body from the params (kind, attributeName, attributeCode, optional dropdown configuration, optional serviceSource) and makes a POST API call to '/identity/fields/custom'.
    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 for the create_identity_custom_field tool. Validates: kind (enum of text/textarea/number/date/dropdown/email), configuration (optional dropdown schema), attributeName (string), attributeCode (string), serviceSource (optional object with serviceFieldId and workspaceId).
    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)
    Tool registration in the MCP server. Registers the tool with name 'create_identity_custom_field', description, and maps CreateIdentityCustomFieldSchema to its inputSchema via zodToJsonSchema.
    {
      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 binding in the toolHandlers map. Maps the tool name 'create_identity_custom_field' to an async function that parses input with CreateIdentityCustomFieldSchema and calls createIdentityCustomField.
    create_identity_custom_field: async (input) =>
      createIdentityCustomField(CreateIdentityCustomFieldSchema.parse(input)),
  • src/index.ts:9-9 (registration)
    Import statement bringing CreateIdentityCustomFieldSchema and createIdentityCustomField into the main index.ts file.
    import { CreateIdentityCustomFieldSchema, createIdentityCustomField } from "./tools/createIdentityCustomField.js";
Behavior2/5

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

No annotations provided. The description only states the action without disclosing any side effects, authentication requirements, or behavioral traits like whether it replaces existing fields or requires specific permissions.

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?

Two sentences with no unnecessary words. It front-loads the key action and scope immediately.

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?

No output schema, no description of return values. With sibling tools for update and delete, the description does not provide context on when creation is appropriate or what happens after creation. Lacks prerequisites and constraints.

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 explains each parameter's meaning. The description adds no additional semantic value beyond stating the tool's purpose.

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 it creates a new identity custom field for an organization and defines it for use across all identities. It distinguishes from sibling 'create_device_custom_field' by specifying 'identity' as the resource.

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 guidance on when to use this tool versus alternatives like update or delete. It does not mention prerequisites, post-creation steps, or when it's appropriate to create a custom field.

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