Skip to main content
Glama
MIT License
25
89
  • Linux
  • Apple
booleanParser.js631 B
export default class boolParser{ constructor(trueList, falseList){ if(trueList) this.trueList = trueList; else this.trueList = ["true"]; if(falseList) this.falseList = falseList; else this.falseList = ["false"]; } parse(val){ if (typeof val === 'string') { //TODO: performance: don't convert const temp = val.toLowerCase(); if(this.trueList.indexOf(temp) !== -1) return true; else if(this.falseList.indexOf(temp) !== -1 ) return false; } return val; } }

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/DMontgomery40/pentest-mcp'

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