Suggest already-allowed packages for a capability
POST
/api/v1/policy/{registry_type}/suggest
const url = 'https://api.pkgplease.com/api/v1/policy/example/suggest';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"capability":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”registry_type
required
string
One of the org's configured registry types (npm is the one in active use).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
capability
required
string
Examplegenerated
{ "capability": "example"}Responses
Section titled “Responses”Matching suggestions
Media typeapplication/json
object
suggestions
Array<object>
object
Examplegenerated
{ "suggestions": [ {} ]}Missing capability
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}