create_target_tag
Add a tag to a target to organize security scans. Specify the target ID and tag name.
Instructions
Add a tag to a target.
Args:
target_id: The ID of the target to add the tag to
name: The name of the tag to add (max 40 characters)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_id | Yes | ||
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- intruder_mcp/server.py:224-234 (handler)MCP tool handler for create_target_tag. Decorated with @mcp.tool(), takes target_id and name, calls api.create_target_tag() and returns a confirmation string.
@mcp.tool() async def create_target_tag(target_id: int, name: str) -> str: """ Add a tag to a target. Args: target_id: The ID of the target to add the tag to name: The name of the tag to add (max 40 characters) """ tag = api.create_target_tag(target_id=target_id, name=name) return f"Added tag '{tag.name}' to target {target_id}" - intruder_mcp/api_client.py:286-288 (helper)API client method that sends POST request to /targets/{target_id}/tags/ with a TagsRequest body and returns a Tags response model.
def create_target_tag(self, target_id: int, name: str) -> Tags: data = TagsRequest(name=name) return Tags(**self.client.post(f"{self.base_url}/targets/{target_id}/tags/", json=data.dict()).json()) - intruder_mcp/enums.py:73-74 (schema)Tags response model with a name field (max 40 characters).
class Tags(BaseModel): name: str = Field(..., max_length=40) - intruder_mcp/enums.py:76-77 (schema)TagsRequest request model with a name field (min 1, max 40 characters).
class TagsRequest(BaseModel): name: str = Field(..., min_length=1, max_length=40) - intruder_mcp/server.py:224-225 (registration)The @mcp.tool() decorator registers create_target_tag as an MCP tool.
@mcp.tool() async def create_target_tag(target_id: int, name: str) -> str: