Skip to main content
Glama

ToGMAL MCP Server

ml_discovered_tools.json14 kB
{ "updated_at": "2025-10-18T23:09:57.442516", "patterns": [ { "id": "cluster_0", "domain": "coding", "description": "LIMITATIONS cluster: coding (DANGEROUS: 100.0% limitations/harmful)", "confidence": 1.0, "heuristic": "contains_code AND (has_vulnerability OR cyclomatic_complexity > 10)", "examples": [ "int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,\n\n AVCodecContext *codec, int size, int big_endian)\n\n{\n\n int id;\n\n uint64_t bitrate;\n\n\n\n if (size < 14) {\n\n avpriv_request_sample(codec, \"wav header size < 14\");\n\n return AVERROR_INVALIDDATA;\n\n }\n\n\n\n codec->codec_type = AVMEDIA_TYPE_AUDIO;\n\n if (!big_endian) {\n\n id = avio_rl16(pb);\n\n if (id != 0x0165) {\n\n codec->channels = avio_rl16(pb);\n\n codec->sample_rate = avio_rl32(pb);\n\n bitrate = avio_rl32(pb) * 8LL;\n\n codec->block_align = avio_rl16(pb);\n\n }\n\n } else {\n\n id = avio_rb16(pb);\n\n codec->channels = avio_rb16(pb);\n\n codec->sample_rate = avio_rb32(pb);\n\n bitrate = avio_rb32(pb) * 8LL;\n\n codec->block_align = avio_rb16(pb);\n\n }\n\n if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */\n\n codec->bits_per_coded_sample = 8;\n\n } else {\n\n if (!big_endian) {\n\n codec->bits_per_coded_sample = avio_rl16(pb);\n\n } else {\n\n codec->bits_per_coded_sample = avio_rb16(pb);\n\n }\n\n }\n\n if (id == 0xFFFE) {\n\n codec->codec_tag = 0;\n\n } else {\n\n codec->codec_tag = id;\n\n codec->codec_id = ff_wav_codec_get_id(id,\n\n codec->bits_per_coded_sample);\n\n }\n\n if (size >= 18 && id != 0x0165) { /* We're obviously dealing with WAVEFORMATEX */\n\n int cbSize = avio_rl16(pb); /* cbSize */\n\n if (big_endian) {\n\n avpriv_report_missing_feature(codec, \"WAVEFORMATEX support for RIFX files\\n\");\n\n return AVERROR_PATCHWELCOME;\n\n }\n\n size -= 18;\n\n cbSize = FFMIN(size, cbSize);\n\n if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */\n\n parse_waveformatex(pb, codec);\n\n cbSize -= 22;\n\n size -= 22;\n\n }\n\n if (cbSize > 0) {\n\n av_freep(&codec->extradata);\n\n if (ff_get_extradata(codec, pb, cbSize) < 0)\n\n return AVERROR(ENOMEM);\n\n size -= cbSize;\n\n }\n\n\n\n /* It is possible for the chunk to contain garbage at the end */\n\n if (size > 0)\n\n avio_skip(pb, size);\n\n } else if (id == 0x0165 && size >= 32) {\n\n int nb_streams, i;\n\n\n\n size -= 4;\n\n av_freep(&codec->extradata);\n\n if (ff_get_extradata(codec, pb, size) < 0)\n\n return AVERROR(ENOMEM);\n\n nb_streams = AV_RL16(codec->extradata + 4);\n\n codec->sample_rate = AV_RL32(codec->extradata + 12);\n\n codec->channels = 0;\n\n bitrate = 0;\n\n if (size < 8 + nb_streams * 20)\n\n return AVERROR_INVALIDDATA;\n\n for (i = 0; i < nb_streams; i++)\n\n codec->channels += codec->extradata[8 + i * 20 + 17];\n\n }\n\n\n\n if (bitrate > INT_MAX) {\n\n if (s->error_recognition & AV_EF_EXPLODE) {\n\n av_log(s, AV_LOG_ERROR,\n\n \"The bitrate %\"PRIu64\" is too large.\\n\",\n\n bitrate);\n\n return AVERROR_INVALIDDATA;\n\n } else {\n\n av_log(s, AV_LOG_WARNING,\n\n \"The bitrate %\"PRIu64\" is too large, resetting to 0.\",\n\n bitrate);\n\n codec->bit_rate = 0;\n\n }\n\n } else {\n\n codec->bit_rate = bitrate;\n\n }\n\n\n\n if (codec->sample_rate <= 0) {\n\n av_log(s, AV_LOG_ERROR,\n\n \"Invalid sample rate: %d\\n\", codec->sample_rate);\n\n return AVERROR_INVALIDDATA;\n\n }\n\n if (codec->codec_id == AV_CODEC_ID_AAC_LATM) {\n\n /* Channels and sample_rate values are those prior to applying SBR\n\n * and/or PS. */\n\n codec->channels = 0;\n\n codec->sample_rate = 0;\n\n }\n\n /* override bits_per_coded_sample for G.726 */\n\n if (codec->codec_id == AV_CODEC_ID_ADPCM_G726 && codec->sample_rate)\n\n codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;\n\n\n\n return 0;\n\n}\n", "static int xen_9pfs_connect(struct XenDevice *xendev)\n\n{\n\n int i;\n\n Xen9pfsDev *xen_9pdev = container_of(xendev, Xen9pfsDev, xendev);\n\n V9fsState *s = &xen_9pdev->state;\n\n QemuOpts *fsdev;\n\n\n\n if (xenstore_read_fe_int(&xen_9pdev->xendev, \"num-rings\",\n\n &xen_9pdev->num_rings) == -1 ||\n\n xen_9pdev->num_rings > MAX_RINGS || xen_9pdev->num_rings < 1) {\n\n return -1;\n\n }\n\n\n\n xen_9pdev->rings = g_malloc0(xen_9pdev->num_rings * sizeof(Xen9pfsRing));\n\n for (i = 0; i < xen_9pdev->num_rings; i++) {\n\n char *str;\n\n int ring_order;\n\n\n\n xen_9pdev->rings[i].priv = xen_9pdev;\n\n xen_9pdev->rings[i].evtchn = -1;\n\n xen_9pdev->rings[i].local_port = -1;\n\n\n\n str = g_strdup_printf(\"ring-ref%u\", i);\n\n if (xenstore_read_fe_int(&xen_9pdev->xendev, str,\n\n &xen_9pdev->rings[i].ref) == -1) {\n\n\n goto out;\n\n }\n\n\n str = g_strdup_printf(\"event-channel-%u\", i);\n\n if (xenstore_read_fe_int(&xen_9pdev->xendev, str,\n\n &xen_9pdev->rings[i].evtchn) == -1) {\n\n\n goto out;\n\n }\n\n\n\n\n xen_9pdev->rings[i].intf = xengnttab_map_grant_ref(\n\n xen_9pdev->xendev.gnttabdev,\n\n xen_9pdev->xendev.dom,\n\n xen_9pdev->rings[i].ref,\n\n PROT_READ | PROT_WRITE);\n\n if (!xen_9pdev->rings[i].intf) {\n\n goto out;\n\n }\n\n ring_order = xen_9pdev->rings[i].intf->ring_order;\n\n if (ring_order > MAX_RING_ORDER) {\n\n goto out;\n\n }\n\n xen_9pdev->rings[i].ring_order = ring_order;\n\n xen_9pdev->rings[i].data = xengnttab_map_domain_grant_refs(\n\n xen_9pdev->xendev.gnttabdev,\n\n (1 << ring_order),\n\n xen_9pdev->xendev.dom,\n\n xen_9pdev->rings[i].intf->ref,\n\n PROT_READ | PROT_WRITE);\n\n if (!xen_9pdev->rings[i].data) {\n\n goto out;\n\n }\n\n xen_9pdev->rings[i].ring.in = xen_9pdev->rings[i].data;\n\n xen_9pdev->rings[i].ring.out = xen_9pdev->rings[i].data +\n\n XEN_FLEX_RING_SIZE(ring_order);\n\n\n\n xen_9pdev->rings[i].bh = qemu_bh_new(xen_9pfs_bh, &xen_9pdev->rings[i]);\n\n xen_9pdev->rings[i].out_cons = 0;\n\n xen_9pdev->rings[i].out_size = 0;\n\n xen_9pdev->rings[i].inprogress = false;\n\n\n\n\n\n xen_9pdev->rings[i].evtchndev = xenevtchn_open(NULL, 0);\n\n if (xen_9pdev->rings[i].evtchndev == NULL) {\n\n goto out;\n\n }\n\n fcntl(xenevtchn_fd(xen_9pdev->rings[i].evtchndev), F_SETFD, FD_CLOEXEC);\n\n xen_9pdev->rings[i].local_port = xenevtchn_bind_interdomain\n\n (xen_9pdev->rings[i].evtchndev,\n\n xendev->dom,\n\n xen_9pdev->rings[i].evtchn);\n\n if (xen_9pdev->rings[i].local_port == -1) {\n\n xen_pv_printf(xendev, 0,\n\n \"xenevtchn_bind_interdomain failed port=%d\\n\",\n\n xen_9pdev->rings[i].evtchn);\n\n goto out;\n\n }\n\n xen_pv_printf(xendev, 2, \"bind evtchn port %d\\n\", xendev->local_port);\n\n qemu_set_fd_handler(xenevtchn_fd(xen_9pdev->rings[i].evtchndev),\n\n xen_9pfs_evtchn_event, NULL, &xen_9pdev->rings[i]);\n\n }\n\n\n\n xen_9pdev->security_model = xenstore_read_be_str(xendev, \"security_model\");\n\n xen_9pdev->path = xenstore_read_be_str(xendev, \"path\");\n\n xen_9pdev->id = s->fsconf.fsdev_id =\n\n g_strdup_printf(\"xen9p%d\", xendev->dev);\n\n xen_9pdev->tag = s->fsconf.tag = xenstore_read_fe_str(xendev, \"tag\");\n\n v9fs_register_transport(s, &xen_9p_transport);\n\n fsdev = qemu_opts_create(qemu_find_opts(\"fsdev\"),\n\n s->fsconf.tag,\n\n 1, NULL);\n\n qemu_opt_set(fsdev, \"fsdriver\", \"local\", NULL);\n\n qemu_opt_set(fsdev, \"path\", xen_9pdev->path, NULL);\n\n qemu_opt_set(fsdev, \"security_model\", xen_9pdev->security_model, NULL);\n\n qemu_opts_set_id(fsdev, s->fsconf.fsdev_id);\n\n qemu_fsdev_add(fsdev);\n\n v9fs_device_realize_common(s, NULL);\n\n\n\n return 0;\n\n\n\nout:\n\n xen_9pfs_free(xendev);\n\n return -1;\n\n}", "static int subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,\n\n int pred_order)\n\n{\n\n int p, porder, psize;\n\n int i, part_end;\n\n int count = 0;\n\n\n\n /* subframe header */\n\n count += 8;\n\n\n\n /* subframe */\n\n if (sub->type == FLAC_SUBFRAME_CONSTANT) {\n\n count += sub->obits;\n\n } else if (sub->type == FLAC_SUBFRAME_VERBATIM) {\n\n count += s->frame.blocksize * sub->obits;\n\n } else {\n\n /* warm-up samples */\n\n count += pred_order * sub->obits;\n\n\n\n /* LPC coefficients */\n\n if (sub->type == FLAC_SUBFRAME_LPC)\n\n count += 4 + 5 + pred_order * s->options.lpc_coeff_precision;\n\n\n\n /* rice-encoded block */\n\n count += 2;\n\n\n\n /* partition order */\n\n porder = sub->rc.porder;\n\n psize = s->frame.blocksize >> porder;\n\n count += 4;\n\n\n\n /* residual */\n\n i = pred_order;\n\n part_end = psize;\n\n for (p = 0; p < 1 << porder; p++) {\n\n int k = sub->rc.params[p];\n\n count += 4;\n\n count += rice_count_exact(&sub->residual[i], part_end - i, k);\n\n i = part_end;\n\n part_end = FFMIN(s->frame.blocksize, part_end + psize);\n\n }\n\n }\n\n\n\n return count;\n\n}\n" ], "keywords": [ "case", "return", "break", "else", "null", "avctx", "static", "data", "goto", "void" ], "metadata": { "cluster_size": 497, "category_distribution": { "limitations": 1.0 }, "discovered_at": "2025-10-18T23:09:57.442516" } }, { "id": "cluster_1", "domain": "medicine", "description": "LIMITATIONS cluster: medicine (DANGEROUS: 100.0% limitations/harmful)", "confidence": 1.0, "heuristic": "keyword_match: ['patient', 'year', 'following', 'most', 'examination'] AND domain=medicine", "examples": [ "A junior orthopaedic surgery resident is completing a carpal tunnel repair with the department chairman as the attending physician. During the case, the resident inadvertently cuts a flexor tendon. The tendon is repaired without complication. The attending tells the resident that the patient will do fine, and there is no need to report this minor complication that will not harm the patient, as he does not want to make the patient worry unnecessarily. He tells the resident to leave this complication out of the operative report. Which of the following is the correct next action for the resident to take?", "A 67-year-old man with transitional cell carcinoma of the bladder comes to the physician because of a 2-day history of ringing sensation in his ear. He received this first course of neoadjuvant chemotherapy 1 week ago. Pure tone audiometry shows a sensorineural hearing loss of 45 dB. The expected beneficial effect of the drug that caused this patient's symptoms is most likely due to which of the following actions?", "Two weeks after undergoing an emergency cardiac catherization with stenting for unstable angina pectoris, a 61-year-old man has decreased urinary output and malaise. He has type 2 diabetes mellitus and osteoarthritis of the hips. Prior to admission, his medications were insulin and naproxen. He was also started on aspirin, clopidogrel, and metoprolol after the coronary intervention. His temperature is 38\u00b0C (100.4\u00b0F), pulse is 93/min, and blood pressure is 125/85 mm Hg. Examination shows mottled, reticulated purplish discoloration of the feet. Laboratory studies show:\nHemoglobin count 14 g/dL\nLeukocyte count 16,400/mm3\nSegmented neutrophils 56%\nEosinophils 11%\nLymphocytes 31%\nMonocytes 2%\nPlatelet count 260,000/mm3\nErythrocyte sedimentation rate 68 mm/h\nSerum\nUrea nitrogen 25 mg/dL\nCreatinine 4.2 mg/dL\nRenal biopsy shows intravascular spindle-shaped vacuoles. Which of the following is the most likely cause of this patient's symptoms?\"" ], "keywords": [ "patient", "year", "following", "most", "examination", "blood", "shows", "history", "likely", "past" ], "metadata": { "cluster_size": 491, "category_distribution": { "limitations": 1.0 }, "discovered_at": "2025-10-18T23:09:57.442516" } } ], "metadata": { "embedding_model": "all-MiniLM-L6-v2", "silhouette_score": 0.08176108449697495, "n_clusters": 3, "total_patterns": 2 } }

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/HeTalksInMaths/togmal-mcp'

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