create_target_tag
Add tags to Intruder.IO targets for organization and categorization. Specify target ID and tag name to label security assessment targets.
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
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_id | Yes | ||
| name | Yes |
Implementation Reference
- intruder_mcp/server.py:218-228 (handler)The main MCP tool handler for 'create_target_tag'. It is registered via @mcp.tool() decorator and implements the tool logic by calling the IntruderAPI client to create the tag.@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:284-286 (helper)Helper function in IntruderAPI client that makes the HTTP request to the Intruder API to create a tag on a target, using TagsRequest and returning Tags.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:67-71 (schema)Pydantic schemas for the tag creation: TagsRequest for input (name field) and Tags for output.class Tags(BaseModel): name: str = Field(..., max_length=40) class TagsRequest(BaseModel): name: str = Field(..., min_length=1, max_length=40)