| 52 | } |
| 53 | |
| 54 | function normalizeTools(raw) { |
| 55 | return raw |
| 56 | .map((t) => ({ |
| 57 | id: t.id, |
| 58 | mcpName: t.names?.mcp ?? t.id, |
| 59 | cliName: t.names?.cli ?? null, |
| 60 | description: t.description ?? "", |
| 61 | title: t.annotations?.title ?? null, |
| 62 | readOnly: Boolean(t.annotations?.readOnlyHint), |
| 63 | destructive: Boolean(t.annotations?.destructiveHint), |
| 64 | openWorld: Boolean(t.annotations?.openWorldHint), |
| 65 | module: t.module ?? null, |
| 66 | predicates: Array.isArray(t.predicates) ? t.predicates : [], |
| 67 | })) |
| 68 | .sort((a, b) => a.mcpName.localeCompare(b.mcpName)); |
| 69 | } |
| 70 | |
| 71 | function normalizeWorkflows(raw) { |
| 72 | return raw |