Skip to main content
Glama
handler.py816 B
import yaml from utils.consts import * from toolkit_testing.integration_tests.docker import write_file, read_file async def read_resource_file( filename: str, container_name: str = LUNAR_PROXY_SERVICE_NAME, directory_path: str = RESOURCES_DIRECTORY, ) -> str: existing_policies_file = await read_file( container_name=container_name, directory_path=directory_path, file=filename, ) return yaml.safe_load(existing_policies_file) async def write_resource_file( filename: str, resource_yaml: str, container_name: str = LUNAR_PROXY_SERVICE_NAME, directory_path: str = RESOURCES_DIRECTORY, ): await write_file( container_name=container_name, directory_path=directory_path, file=filename, content=resource_yaml, )

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/TheLunarCompany/lunar'

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