Your Data · Supply Chain

list_my_lockfiles

List the dependency lockfiles (SBOM) your organisation has uploaded, with package and findings counts. Costs 1 credit.

POST
tools/call

Cost: 1 credit per successful call  ·  Scope: mcp:org  ·  Response shape: jsonb

Returns data scoped to your own organisation only — the organisation is resolved from your API key and injected server-side, never read from the request.

Parameters

limitintegeroptionaldefault: 50

Maximum number of lockfiles to return. Accepted range: 1–200.

Example invocation

Ask your agent: "List the lockfiles we've uploaded."

curl -s https://api.precursorintelligence.com/functions/v1/mcp \
  -H "Authorization: Bearer $PRECURSOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_my_lockfiles","arguments":{"limit":50}}}'

Response

result.content[0].text (parsed)
{
  "count": 2,
  "items": [
    {
      "id": "a3f1c9e2-7b40-4d8a-9c11-2e6f8b1d4a90",
      "name": "web-frontend",
      "filename": "package-lock.json",
      "format": "npm",
      "ecosystem": "npm",
      "package_count": 1842,
      "findings_count": 7,
      "last_scanned_at": "2026-06-15T09:42:00.000Z",
      "created_at": "2026-04-02T14:18:00.000Z"
    },
    {
      "id": "c7d2b815-6e93-4f21-8a5c-1b9d3e7f2c64",
      "name": "data-pipeline",
      "filename": "requirements.txt",
      "format": "pip",
      "ecosystem": "PyPI",
      "package_count": 214,
      "findings_count": 2,
      "last_scanned_at": "2026-06-14T22:05:00.000Z",
      "created_at": "2026-03-19T11:30:00.000Z"
    }
  ],
  "generated_at": "2026-06-18T08:15:00.000Z"
}

The full MCP envelope, including _meta.precursor with request_id, credits, and response_truncated, is documented in Response Format.

Response fields

countintegeroptional

Number of lockfiles returned (equals items.length).

itemsarrayoptional

Lockfiles your organisation has uploaded. Each object contains the fields below.

items[].idstringoptional

Unique identifier (UUID) for the lockfile.

items[].namestringoptional

Display name for the lockfile / project.

items[].filenamestringoptional

Original filename of the uploaded lockfile (e.g. package-lock.json).

items[].formatstringoptional

Lockfile format (e.g. npm, pip).

items[].ecosystemstringoptional

Package ecosystem the lockfile belongs to (e.g. npm, PyPI).

items[].package_countintegeroptional

Number of packages (dependencies) parsed from the lockfile.

items[].findings_countintegeroptional

Number of findings associated with the lockfile.

items[].last_scanned_atstring | nulloptional

ISO 8601 timestamp of the most recent scan, or null if never scanned.

items[].created_atstringoptional

ISO 8601 timestamp when the lockfile was uploaded.

generated_atstringoptional

ISO 8601 timestamp indicating when this response was generated.

Errors

CodeMessageWhen
-32602invalid_params: limit: min:1limit is less than 1
-32602invalid_params: limit: max:200limit exceeds 200
-32001unauthorizedThe API key is invalid/revoked, the IP is not allowed, or the key lacks the mcp:org scope.
-32002insufficient_creditsYour credit balance is zero; top up from the dashboard
-32603internalUnexpected server error; the credit is automatically refunded