Skip to content

Suggest already-allowed packages for a capability

POST
/api/v1/policy/{registry_type}/suggest
curl --request POST \
--url https://api.pkgplease.com/api/v1/policy/example/suggest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "capability": "example" }'

Backs the MCP suggest_allowed tool. Keyword-matches against the org's enabled corpus entries.

registry_type
required
string

One of the org's configured registry types (npm is the one in active use).

Media typeapplication/json
object
capability
required
string
Examplegenerated
{
"capability": "example"
}

Matching suggestions

Media typeapplication/json
object
suggestions
Array<object>
object
Examplegenerated
{
"suggestions": [
{}
]
}

Missing capability

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}