Skip to main content
Glama
wrale

mcp-server-tree-sitter

by wrale

list_query_templates_tool

Retrieve available query templates, optionally filtered by programming language, to enhance code analysis using the MCP server with tree-sitter integration.

Instructions

List available query templates.

Args: language: Optional language to filter by Returns: Available templates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNo

Implementation Reference

  • The main handler function for the 'list_query_templates_tool' MCP tool. It is registered via the @mcp_server.tool() decorator and delegates to the list_query_templates helper function.
    @mcp_server.tool() def list_query_templates_tool(language: Optional[str] = None) -> Dict[str, Any]: """List available query templates. Args: language: Optional language to filter by Returns: Available templates """ from ..language.query_templates import list_query_templates return list_query_templates(language)
  • Core helper function that implements the logic for listing query templates, returning the QUERY_TEMPLATES dictionary optionally filtered by language.
    def list_query_templates(language: Optional[str] = None) -> Dict[str, Any]: """ List available query templates. Args: language: Optional language to filter by Returns: Dictionary of templates by language """ if language: return {language: QUERY_TEMPLATES.get(language, {})} return QUERY_TEMPLATES

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/wrale/mcp-server-tree-sitter'

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