create_target_tag
Assign tags to specific targets in Intruder.IO using the MCP server by providing the target ID and tag name for improved organization and identification.
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 |
|---|---|---|---|
| name | Yes | ||
| target_id | Yes |
Implementation Reference
- intruder_mcp/server.py:218-228 (handler)The main handler function for the MCP tool 'create_target_tag'. It is registered via @mcp.tool() decorator, takes target_id and name as input, calls the API client to create the 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:284-286 (helper)Helper method in the IntruderAPI class that makes the HTTP POST request to the Intruder API to create a target tag, using TagsRequest for the payload and returning a Tags object.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/server.py:218-218 (registration)The @mcp.tool() decorator registers the create_target_tag function as an MCP tool.@mcp.tool()