Skip to main content
Glama

create_targets

Add target addresses to Intruder.IO for security testing by specifying one or multiple addresses to create targets.

Instructions

Create one or more targets. Args: addresses: List of target addresses to create Example: ['example.com'] for a single target Example: ['example.com', 'test.com'] for multiple targets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressesYes

Implementation Reference

  • The main handler function for the 'create_targets' MCP tool. It accepts a list of addresses, converts them to target dicts, calls the API client's bulk_create_targets method, and returns a confirmation message.
    @mcp.tool() async def create_targets(addresses: List[str]) -> str: """ Create one or more targets. Args: addresses: List of target addresses to create Example: ['example.com'] for a single target Example: ['example.com', 'test.com'] for multiple targets """ targets = [{'address': addr} for addr in addresses] result = api.bulk_create_targets(targets) return f"Created {len(addresses)} targets"
  • The @mcp.tool() decorator registers the create_targets function as an MCP tool.
    @mcp.tool()
  • Helper method in IntruderAPI class that handles bulk creation of targets, avoiding duplicates by checking existing targets and making API call only for new ones.
    def bulk_create_targets(self, targets: List[Dict[str, str]]) -> List[Target]: # Get list of existing target addresses existing_targets = list(self.list_targets_all()) existing_addresses = {target.address for target in existing_targets} # Filter out targets that already exist new_targets = [target for target in targets if target['address'] not in existing_addresses] if not new_targets: return [target for target in existing_targets if target.address in {t['address'] for t in targets}] response = self.client.post(f"{self.base_url}/targets/bulk/", json=new_targets) created_targets = [Target(**target) for target in response.json()] # Combine newly created targets with existing ones return created_targets + [target for target in existing_targets if target.address in {t['address'] for t in targets}]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/intruder-io/intruder-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server