Skip to main content
Glama

clear_knowledge

Remove all stored knowledge from the SourceSage MCP server graph to reset or update the codebase context efficiently.

Instructions

Clear all knowledge from the graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • This is the implementation of the 'clear_knowledge' tool handler. It is decorated with @self.mcp.tool(), which also serves as its registration in the MCP server. The function clears the knowledge graph by creating a new empty KnowledgeGraph instance and saves it to the storage path if specified.
    @self.mcp.tool() def clear_knowledge() -> str: """Clear all knowledge from the graph.""" self.knowledge = KnowledgeGraph() # Save empty knowledge if storage path is set if self.storage_path: self.knowledge.save_to_file(self.storage_path) return "Knowledge graph cleared successfully"

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/sarathsp06/sourcesage'

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