For the complete documentation index, see llms.txt. This page is also available as Markdown.

Patch Project Portfolio Streams

Description

Links AttackForge Portfolio Streams to an existing project, or unlinks them. This is a write operation. Linking a stream to a project places the project and its assets in that stream; each operation names the stream together with the portfolio it belongs to.

One call can mix up to 50 add and remove operations, one per stream, and the call is refused without changing anything if any operation cannot be applied. Discover streams to link with find_portfolio_streams and the current links with find_project_portfolio_streams. Requires the Portfolios module to be enabled; otherwise returns the error Portfolios module is not enabled.

The shape of args is declared inline (see Building args for Write Tools), so no preparatory call is needed.

Preconditions: the caller must be an Admin, the project's owner, or a Project Coordinator with access to the project; a caller who is not an Admin may only add or remove the streams they are allowed to link (those find_portfolio_streams lists, and those find_project_portfolio_streams marks with can_link); a stream of an archived portfolio can be removed but not added. No email is sent. On success the portfolio and stream id pairs are returned, sorted by outcome.

How To Enable

  1. Go to Users

  2. Select the user you would like to provide access to this tool

  3. Click on Access > MCP

  4. Click on Add Tools

  5. Select the tool patch_project_portfolio_streams and click Add

Example Prompts

  • Link project X to the EMEA Web Applications stream of the Cloud Security portfolio.

  • Remove the ACME project from the Legacy Systems stream.

  • Move this project from the APAC stream to the EMEA stream.

Parameters

Parameter
Type
Required
Description

args

object

Yes

The project-portfolio-streams patch payload - see the keys below.

args keys:

Key
Type
Required
Description

project_id

string

Yes

Id (24-hex) of the project whose linked portfolio streams are changed. Source: find_projects.

operations

array

Yes

1 to 50 operations, at most one per stream - see the keys below.

operations item keys:

Key
Type
Required
Description

type

string

Yes

'add' to link the stream, 'remove' to unlink it.

portfolio_id

string

Yes

Id (24-hex) of the portfolio the stream belongs to. For 'add', the portfolio must exist and not be archived (source: find_portfolio_streams); for 'remove', source: find_project_portfolio_streams. A stream of an archived portfolio can still be unlinked.

stream_id

string

Yes

Id (24-hex) of the stream. For 'add', source: find_portfolio_streams; a stream that is already linked is reported as unchanged. For 'remove', the stream must currently be linked to the project (source: find_project_portfolio_streams).

Refusals - the whole call is refused, and nothing is written, when:

  • a stream_id appears in more than one operation: Stream <stream_id> appears in more than one operation

  • the stream does not belong to the named portfolio, or either does not exist: Stream <stream_id> not found in Portfolio <portfolio_id>

  • an 'add' names an archived portfolio: Portfolio <portfolio_id> not found or archived

  • a caller who is not an Admin names a pair they may not link: Insufficient permission to change the link to Stream <stream_id> of Portfolio <portfolio_id>

  • a 'remove' names a stream that is not linked to the project: Stream <stream_id> is not linked to Project <project_id>

added, removed and unchanged each list { portfolio_id, stream_id } pairs. unchanged lists the streams asked to be linked that already were. It is not an error and the call should not be retried.

Example Response

Last updated