Skip to main content
Glama
moneyforward-i

Admina MCP Server

update_device

Update device information by providing device ID and required fields (asset number, subtype, model name). Modify preset fields, custom fields, and properties.

Instructions

Update an existing device's information. Can update preset fields, custom fields, and device properties. Note: fields.preset.asset_number, fields.preset.subtype, fields.preset.model_name are always required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdYesThe ID of the device to update
memoNoAdditional notes or memo about the device
fieldsYesDevice field values. Note: preset.asset_number, preset.subtype, and preset.model_name are always required

Implementation Reference

  • The main handler function for the update_device tool. Calls makePatchApiCall to PATCH /devices/{deviceId} with the fields and optional memo.
    export async function updateDevice(params: UpdateDeviceParams) {
      const client = getClient();
    
      const body: Record<string, unknown> = {
        fields: params.fields,
      };
    
      if (params.memo !== undefined) {
        body.memo = params.memo;
      }
    
      return client.makePatchApiCall(`/devices/${params.deviceId}`, body);
    }
  • Input schema (UpdateDeviceSchema + UpdateDeviceFieldsSchema) defining the structure for updating a device: deviceId, optional memo, and fields (preset fields like asset_number, subtype, model_name, plus optional preset and custom fields).
    const UpdateDeviceFieldsSchema = z
      .object({
        // Required preset fields (must always be provided in update)
        "preset.asset_number": z.string().describe("Asset number (REQUIRED for update)"),
        "preset.subtype": z
          .enum(["desktop_pc", "laptop_pc", "tablet_pc", "phone", "monitor", "server", "peripheral_device", "other"])
          .describe("Device subtype (REQUIRED for update)"),
        "preset.model_name": z.string().describe("Model name (REQUIRED for update)"),
    
        // 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"
    
    export const UpdateDeviceSchema = z.object({
      deviceId: z.number().describe("The ID of the device to update"),
      memo: z.string().optional().describe("Additional notes or memo about the device"),
      fields: UpdateDeviceFieldsSchema.describe(
        "Device field values. Note: preset.asset_number, preset.subtype, and preset.model_name are always required",
      ),
    });
  • src/index.ts:125-128 (registration)
    Registration of the 'update_device' tool with description and inputSchema in the ListToolsRequestSchema handler.
    name: "update_device",
    description:
      "Update an existing device's information. Can update preset fields, custom fields, and device properties. Note: fields.preset.asset_number, fields.preset.subtype, fields.preset.model_name are always required.",
    inputSchema: zodToJsonSchema(UpdateDeviceSchema),
  • src/index.ts:301-301 (registration)
    Tool handler wiring: maps 'update_device' to updateDevice function with UpdateDeviceSchema.parse.
    update_device: async (input) => updateDevice(UpdateDeviceSchema.parse(input)),
  • Re-exports updateDevice and UpdateDeviceSchema from src/tools/index.ts to be consumed by src/index.ts.
    export * from "./updateDevice.js";
    export * from "./updateDeviceMeta.js";
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It states the tool updates information but does not disclose behavioral traits such as whether the update is destructive (replaces fields vs. merges), side effects, authorization requirements, or response format. The description is insufficient for an agent to infer safe usage.

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 very concise: two sentences with no extraneous content. The first sentence clearly states the purpose, and the second provides a critical requirement note. It is well front-loaded and efficient.

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 complexity of the tool (many nested preset fields, custom fields, and device properties), the description is too brief. It does not explain what 'device properties' entails, how updates affect existing data, or the behavior for optional fields. Without an output schema, this leaves significant gaps for an agent.

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% and the parameters are well-described in the schema. The description adds 'Can update preset fields, custom fields, and device properties' which is already evident from the schema. The note about required fields repeats what the schema already indicates. Thus, the description adds marginal value beyond the schema.

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 'Update an existing device's information' and mentions updating preset fields, custom fields, and device properties. It differentiates from siblings like create_device (creation) and update_device_custom_field (custom fields only) by covering multiple update aspects, but does not explicitly contrast with them.

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 a note about required fields but lacks guidance on when to use this tool versus alternatives (e.g., update_device_custom_field, update_device_meta). No context about prerequisites, when not to use, or best practices.

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