Skip to main content
Glama
chetaniitbhilai

Keyword Search MCP Server

tool.py611 B
import os from typing import List def search_keyword_in_file(file_path: str, keyword: str) -> List[str]: if not os.path.exists(file_path): return [f"Error: {file_path} not found"] keyword = keyword.lower() # 🔹 Convert keyword to lowercase results = [] with open(file_path, 'r', encoding='utf-8') as f: for idx, line in enumerate(f, start=1): if keyword in line.lower(): # 🔹 Convert line to lowercase results.append(f"Line {idx}: {line.strip()}") if not results: return [f"No matches found for '{keyword}'"] return results

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/chetaniitbhilai/Ressl_MCP'

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