---
title: "Medisolv Portal Manager"
type: "Skill"
slug: "portal-manager"
icon: "admin_panel_settings"
category: "Platform"
tags: ["Meta", "Admin", "Portal", "Stats", "Developer Tools", "Platform"]
installs: "0"
author: "Medisolv Platform Team"
authorInitial: "M"
lastUpdated: "2026-03-26"
popularity: "5.0/5"
reviewCount: "New"
platformTags: ["v1.0", "Internal"]
installLabel: "CLI"
securityBadges:
  - label: "Data Handling"
    status: "No PHI — portal metadata only"
  - label: "Compliance"
    status: "Internal Developer Use"
---

# Medisolv Portal Manager

Gives any AI agent the ability to query install statistics and update resource metadata in the Medisolv AI Discovery Portal's SQLite database — without needing direct database access.

## When to Use

Use this skill when you need to:

- Check how many times a Skill, MCP, or Subagent has been installed
- View the most popular resources across the portal
- Update the `version`, `contentUpdatedAt`, or `notes` fields for a resource after making changes to its files
- Automate metadata updates as part of a resource authoring or release workflow
- Diagnose whether a resource is being discovered and used

## Portal Admin API

The portal exposes two admin endpoints. Both are hosted at the same base URL as the portal itself.

### GET /api/admin/metadata

Returns install stats for every resource in the portal, sorted by most installs first.

**No authentication required.**

```
GET https://<portal-url>/api/admin/metadata
```

**Response:**
```json
{
  "resources": [
    {
      "slug": "citc",
      "resourceType": "skill",
      "installCount": 42,
      "lastInstalledAt": 1711411200000,
      "version": "1.2.0",
      "contentUpdatedAt": "2026-03-26",
      "notes": "Added browser auth mode",
      "createdAt": 1711000000000,
      "updatedAt": 1711411200000
    }
  ]
}
```

### PATCH /api/admin/metadata

Updates the content metadata for a single resource. Requires an `Authorization: Bearer <ADMIN_API_KEY>` header.

```
PATCH https://<portal-url>/api/admin/metadata
Authorization: Bearer <ADMIN_API_KEY>
Content-Type: application/json
```

**Request body:**
```json
{
  "slug": "citc",
  "resourceType": "skill",
  "version": "1.3.0",
  "contentUpdatedAt": "2026-03-26",
  "notes": "Optional: describe what changed in this version"
}
```

All fields except `slug` and `resourceType` are optional — only include the ones you want to update.

**Response:** Returns the full updated resource metadata row.

## Step-by-Step Instructions

### Checking install stats

1. Call `GET /api/admin/metadata` (no auth needed).
2. Look at the `resources` array — it's sorted by `installCount` descending.
3. Find the resource by matching `slug` and `resourceType`.
4. Report the `installCount` and `lastInstalledAt` to the user.

### Updating resource metadata after a content change

1. Confirm the `slug` and `resourceType` with the user.
2. Determine the new `version` (use semver: `1.0.0`, `1.1.0`, etc.).
3. Set `contentUpdatedAt` to today's date in `YYYY-MM-DD` format.
4. Optionally write a short `notes` string summarising the change.
5. Call `PATCH /api/admin/metadata` with the `ADMIN_API_KEY` in the `Authorization` header.
6. Confirm success by reading the `resource` object in the response.

## Environment Variables

| Variable | Where | Description |
|---|---|---|
| `ADMIN_API_KEY` | Azure App Service → Configuration → Application settings | Secret key that authorises PATCH requests. Set this before using the write endpoint. |
| `PORTAL_URL` | Your local `.env` or shell | Base URL of the portal, e.g. `https://aidiscoveryportal.azurewebsites.net` |

## Example Prompts

> "Show me the top 5 most-installed skills in the portal."

> "I just updated the citc skill to add browser auth mode. Bump its version to 1.3.0 and record today's date as the content update."

> "Which MCPs haven't had any installs yet?"

## Tips

- `installCount` is incremented automatically every time the Auggie CLI fetches a resource from the portal API. You don't need to call anything manually to track installs.
- If `ADMIN_API_KEY` is not set in the App Service configuration, all PATCH requests will return `401 Unauthorized`. Set it in Azure Portal → App Service → Configuration before using write operations.
- The `version` field is free-form text — use semver (`1.0.0`) for consistency.
- `contentUpdatedAt` should be a quoted `YYYY-MM-DD` string matching the format used in the resource's frontmatter `lastUpdated` field.

