get_asset
Retrieve complete details for a single asset by its ID, including model, serial, location, role, and current loan status.
Instructions
Get full detail for a single asset (instrument, equipment, sub-item) by id. Includes model, serial, location, role, and the current loan if any.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset_id | Yes | Asset uuid (the gear's id field). |
Implementation Reference
- src/tools/index.ts:64-69 (handler)The handler function for the get_asset tool. Extracts the asset_id from args, validates it, resolves the school context, and makes a GET request to /v1/schools/{schoolId}/gear/{id}.
async handler(args, client) { const id = String(args.asset_id ?? ''); if (!id) throw new Error('asset_id is required'); const ctx = await client.getContext(); return client.get<unknown>(`/v1/schools/${ctx.schoolId}/gear/${id}`); }, - src/tools/index.ts:53-63 (schema)The input schema for get_asset, defining asset_id as a required string property (the gear's UUID).
inputSchema: { type: 'object', properties: { asset_id: { type: 'string', description: "Asset uuid (the gear's id field).", }, }, required: ['asset_id'], additionalProperties: false, }, - src/tools/index.ts:194-195 (registration)Registration of getAsset in the tools array exported from the module.
listSchools, getAsset, - src/tools/index.ts:202-202 (registration)The toolByName map which allows looking up get_asset by its name string.
export const toolByName = new Map(tools.map((t) => [t.name, t]));