Skip to main content
Glama

save_partial_finding

Saves partial penetration testing findings like open ports and protocols for later analysis when data is too long or already exists elsewhere.

Instructions

save partial findings for later use (like open ports, used protocols, versions etc.) if finding data is too long or already exists in another file dont save it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
contentYes

Implementation Reference

  • The handler function decorated with @mcp.tool for the 'save_partial_finding' tool. It creates the project directory if it doesn't exist and uses the save_file helper to write the provided content to the specified filename in the project directory.
    @mcp.tool(name="save_partial_finding",description="save partial findings for later use (like open ports, used protocols, versions etc.) if finding data is too long or already exists in another file dont save it") def save_partial_finding(filename: str,content: str): os.makedirs(config.PROJECT_DIRECTORY, exist_ok=True) save_file(config.PROJECT_DIRECTORY, filename, content)
  • Helper function used by save_partial_finding to save content to a file in the specified directory, with validation and error handling.
    def save_file(directory: str, filename: str, content: str) -> bool: try: if not directory or not filename: raise ValueError("Directory and filename cannot be empty") if not isinstance(content, str): raise ValueError("Content must be a string") dir_path = Path(directory) dir_path.mkdir(parents=True, exist_ok=True) file_path = dir_path / filename with open(file_path, 'w', encoding='utf-8') as file: file.write(content) print(f"File saved successfully: {file_path}") return True except Exception as e: print(f"Error saving file: {str(e)}") return False
  • The @mcp.tool decorator registers the save_partial_finding function as an MCP tool.
    @mcp.tool(name="save_partial_finding",description="save partial findings for later use (like open ports, used protocols, versions etc.) if finding data is too long or already exists in another file dont save it")

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/YoussefSahnoun/PentestMCP'

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