Skip to main content
Glama
moneyforward-i

Admina MCP Server

create_device

Add a new device to your organization by specifying device type, asset number, and model name. Optionally include additional preset and custom fields.

Instructions

Create a new device for an organization. Requires device type (subtype), asset number, and model name. Can include optional preset fields and custom fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoNoAdditional notes or memo about the device
fieldsYesDevice field values including preset and custom fields

Implementation Reference

  • The async function that executes the create_device tool logic. It calls makePostApiCall on the AdminaApiClient to POST /devices with the device fields and optional memo.
    export async function createDevice(params: CreateDeviceParams) {
      const client = getClient();
    
      const body: Record<string, unknown> = {
        fields: params.fields,
      };
    
      if (params.memo !== undefined) {
        body.memo = params.memo;
      }
    
      return client.makePostApiCall("/devices", new URLSearchParams(), body);
    }
  • The Zod schema (CreateDeviceSchema) that defines the input shape: an optional memo string and a 'fields' object containing preset and custom device fields.
    export const CreateDeviceSchema = z.object({
      memo: z.string().optional().describe("Additional notes or memo about the device"),
      fields: DeviceFieldsSchema.describe("Device field values including preset and custom fields"),
    });
  • The DeviceFieldsSchema defines all preset device fields (asset_number, subtype, model_name, serial_number, etc.) and allows custom fields via catchall.
    const DeviceFieldsSchema = z
      .object({
        // Required preset fields
        "preset.asset_number": z.string().describe("Asset number (REQUIRED)"),
        "preset.subtype": z
          .enum(["desktop_pc", "laptop_pc", "tablet_pc", "phone", "monitor", "server", "peripheral_device", "other"])
          .describe("Device subtype (REQUIRED)"),
        "preset.model_name": z.string().describe("Model name (REQUIRED)"),
    
        // Optional preset fields
        "preset.serial_number": z.string().optional().describe("Serial number"),
        "preset.model_number": z.string().optional().describe("Model number"),
        "preset.memory": z.string().optional().describe("Memory specification"),
        "preset.hdd_ssd": z.string().optional().describe("Storage specification"),
        "preset.cpu": z.string().optional().describe("CPU specification"),
        "preset.os": z.string().optional().describe("Operating system"),
        "preset.size": z.string().optional().describe("Size/dimensions"),
        "preset.manufacturer": z.string().optional().describe("Manufacturer name"),
        "preset.supplier": z.string().optional().describe("Supplier name"),
        "preset.procurement_method": z
          .enum(["purchase", "lease", "rental", "other"])
          .optional()
          .describe("Procurement method"),
        "preset.purchase_date": z.string().optional().describe("Purchase date (YYYY-MM-DD format)"),
        "preset.purchase_cost": z.number().optional().describe("Purchase cost"),
        "preset.warranty_period": z.string().optional().describe("Warranty period"),
        "preset.decommission_date": z.string().optional().describe("Decommission date (YYYY-MM-DD format)"),
        "preset.scheduled_return_date": z.string().optional().describe("Scheduled return date (YYYY-MM-DD format)"),
        "preset.fixed_asset": z.enum(["yes", "no"]).optional().describe("Fixed asset status"),
        "preset.phone_number": z.string().optional().describe("Phone number (for phone devices)"),
        "preset.sim_number": z.string().optional().describe("SIM number (for phone devices)"),
        "preset.mobile_plan": z.string().optional().describe("Mobile plan (for phone devices)"),
        "preset.hostname": z.string().optional().describe("Hostname"),
        "preset.version": z.string().optional().describe("Version"),
        "preset.keyboard_layout": z.enum(["us", "uk", "jis", "other"]).optional().describe("Keyboard layout"),
        "preset.usage_start_date": z.string().optional().describe("Usage start date (YYYY-MM-DD format)"),
        "preset.usage_end_date": z.string().optional().describe("Usage end date (YYYY-MM-DD format)"),
      })
      .catchall(z.union([z.string(), z.number()]).optional()); // Allow custom fields like "custom.xxx"
  • src/index.ts:118-122 (registration)
    Registers the tool 'create_device' in the ListToolsRequestSchema handler with its description and inputSchema derived from CreateDeviceSchema.
    {
      name: "create_device",
      description:
        "Create a new device for an organization. Requires device type (subtype), asset number, and model name. Can include optional preset fields and custom fields.",
      inputSchema: zodToJsonSchema(CreateDeviceSchema),
  • src/index.ts:300-300 (registration)
    Maps the tool name 'create_device' to its handler in the toolHandlers record, parsing input with CreateDeviceSchema before calling createDevice.
    create_device: async (input) => createDevice(CreateDeviceSchema.parse(input)),
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits but only states that it creates a device and requires certain fields. It fails to mention side effects, authentication needs, rate limits, or what happens on duplicate asset numbers. The agency lacks crucial context for safe invocation.

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 concise with two short sentences, no redundancy, and front-loaded with the core purpose. Every word adds value.

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?

Given the complex nested input schema and lack of annotations, the description is incomplete. It does not explain the structure of the 'fields' object (preset prefix vs custom fields) or provide any execution context. The schema fills the gaps, but the description could be more helpful.

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 schema coverage is 100% with detailed descriptions for all parameters. The description adds no new parameter information beyond restating the required fields, and it omits mentioning the 'memo' parameter. It does not improve upon the schema's existing clarity.

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 'Create a new device for an organization', providing a specific verb and resource. It also lists the required fields (subtype, asset number, model name), making the tool's purpose very clear. The action 'create' distinguishes it from sibling tools like 'update_device'.

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?

The description provides no guidance on when to use this tool versus alternatives like 'update_device' or 'get_devices'. It does not mention exclusions, prerequisites, or context for use, leaving the agent without decision support.

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