aps_get_submittal_item
Fetch complete details for a specific submittal item using its project and item IDs.
Instructions
Get full details for a single submittal item by ID. Returns the complete item object from the API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID (UUID or 'b.' prefixed – auto‑converted). | |
| item_id | Yes | Submittal item UUID. |
Implementation Reference
- Validates the submittal item_id parameter (required, no traversal tokens, must be UUID format). Used by the aps_get_submittal_item handler.
export function validateSubmittalItemId(id: string): string | null { if (!id) return "item_id is required."; if (containsTraversalTokens(id)) return "item_id contains disallowed characters ('/', '\\', '%2F', or '..')."; if (!UUID_RE.test(id)) return "item_id must be a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."; return null; } - src/index.ts:887-907 (schema)Tool registration/schema for aps_get_submittal_item — defines name, description, and inputSchema (project_id and item_id, both required).
// 21 ── aps_get_submittal_item { name: "aps_get_submittal_item", description: "Get full details for a single submittal item by ID. " + "Returns the complete item object from the API.", inputSchema: { type: "object" as const, properties: { project_id: { type: "string", description: "Project ID (UUID or 'b.' prefixed – auto‑converted).", }, item_id: { type: "string", description: "Submittal item UUID.", }, }, required: ["project_id", "item_id"], }, }, - src/index.ts:1497-1512 (handler)Handler function for aps_get_submittal_item — validates project_id and item_id, builds the submittalPath to 'items/{itemId}', makes a GET request, and returns the raw JSON response.
// ── aps_get_submittal_item ────────────────────────────────── if (name === "aps_get_submittal_item") { const projectId = args.project_id as string; const rawItemId = args.item_id as string; const e1 = validateSubmittalProjectId(projectId); if (e1) return fail(e1); const e2 = validateSubmittalItemId(rawItemId); if (e2) return fail(e2); const itemId = encodeURIComponent(rawItemId); const t = await token(); const raw = await apsDmRequest("GET", submittalPath(projectId, `items/${itemId}`), t, { headers: { "Content-Type": "application/json" }, }); return json(raw); } - Validates the submittal project_id — required, no traversal tokens, must be UUID optionally prefixed with 'b.'.
export function validateSubmittalProjectId(id: string): string | null { if (!id) return "project_id is required."; if (containsTraversalTokens(id)) return "project_id contains disallowed characters ('/', '\\', '%2F', or '..')."; // Accept 'b.<uuid>' (DM format) or plain UUID (ACC format) const bare = id.startsWith("b.") ? id.slice(2) : id; if (!UUID_RE.test(bare)) return "project_id must be a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) optionally prefixed with 'b.'."; return null; }