Skip to main content
Glama

mcp-solver

MIT License
133
  • Linux
  • Apple
basic_templates.py828 B
""" Basic templates for ASP (clingo). This module provides template functions for common ASP patterns. """ def facts(atoms: list[str]) -> str: """ Generate a string of ASP facts from a list of atoms. Args: atoms: List of atoms (strings) Returns: A string containing the ASP facts. Example: ['a', 'b'] -> 'a.\nb.' """ return "\n".join([f"{atom}." for atom in atoms]) def rule(head: str, body: list[str]) -> str: """ Generate a simple ASP rule. Args: head: The head of the rule. body: A list of atoms in the body of the rule. Returns: A string containing the ASP rule. Example: rule('c', ['a', 'b']) -> 'c :- a, b.' """ if not body: return f"{head}." body_str = ", ".join(body) return f"{head} :- {body_str}."

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/szeider/mcp-solver'

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