Skip to main content
Glama

stripe

Official
by stripe
test_configuration.py1.55 kB
import unittest from stripe_agent_toolkit.configuration import is_tool_allowed class TestConfigurations(unittest.TestCase): def test_allowed(self): tool = { "actions": { "customers": {"create": True, "read": True}, "invoices": {"create": True, "read": True}, } } configuration = { "actions": { "customers": {"create": True, "read": True}, "invoices": {"create": True, "read": True}, } } self.assertTrue(is_tool_allowed(tool, configuration)) def test_partial_allowed(self): tool = { "actions": { "customers": {"create": True, "read": True}, "invoices": {"create": True, "read": True}, } } configuration = { "actions": { "customers": {"create": True, "read": True}, "invoices": {"create": True, "read": False}, } } self.assertFalse(is_tool_allowed(tool, configuration)) def test_not_allowed(self): tool = { "actions": { "payment_links": {"create": True}, } } configuration = { "actions": { "customers": {"create": True, "read": True}, "invoices": {"create": True, "read": True}, } } self.assertFalse(is_tool_allowed(tool, configuration)) if __name__ == "__main__": unittest.main()

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/stripe/agent-toolkit'

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