Skip to content

Built-in MCP Server Tools

CTX provides several tools that can be enabled or disabled through environment variables. Below is a description of each tool, how to configure them, and how to use advanced features like JSON Schema, conditional arguments, and template processing.

Environment Variables Configuration

The tools system can be configured using environment variables to enable or disable specific features:

General Configuration

VariableDescriptionDefault
MCP_CUSTOM_TOOLS_ENABLEEnable/disable custom toolstrue
MCP_TOOL_MAX_RUNTIMEMaximum runtime for a command in seconds30
MCP_TOOL_COMMAND_EXECUTIONEnable/disable command executiontrue
MCP_FILE_OPERATIONSMaster switch for all file operation toolstrue
MCP_FILE_WRITEEnable/disable file write operationstrue
MCP_FILE_DIRECTORIES_LISTEnable/disable directory listingtrue
MCP_DOCS_TOOLS_ENABLEDEnable/disable Context7 documentation toolstrue
MCP_PROJECT_OPERATIONSEnable/disable project operationstrue

Available Tool Categories

File Operations

Master switch for all file operation tools. When set to false, all below file tools are disabled regardless of their individual settings.

Tool KeyDescriptionEnvironment VariableDefault
file-readRead content from a fileAlways available when file operations are enabled-
directory-listList files and directories in a specified pathMCP_FILE_DIRECTORIES_LISTtrue
file-writeCreate new files or modify existing onesMCP_FILE_WRITEtrue

Context Operations

Tools for working with context information.

Tool KeyDescriptionEnvironment VariableDefault
context-requestRequest context information using filters and modifiersAlways available when context operations are enabled-
context-getGet a specific context documentAlways available when context operations are enabled-
contextList all available contextsAlways available when context operations are enabled-

Prompt Operations

Experimental tools for working with prompts.

Tool KeyDescriptionEnvironment VariableDefault
prompt-getRetrieve a specific promptMCP_PROMPT_OPERATIONSfalse (experimental)
prompts-listList all available promptsMCP_PROMPT_OPERATIONSfalse (experimental)

Docs Tools

Tools for searching and retrieving documentation from the Context7 service.

Tool KeyDescriptionEnvironment VariableDefault
library-searchSearch for available documentation libraries in Context7MCP_DOCS_TOOLS_ENABLEDtrue
find-docsFind and retrieve documentation for a specific libraryMCP_DOCS_TOOLS_ENABLEDtrue

library-search Tool

Search for available documentation libraries in the Context7 service.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringYes-Search query to find libraries
maxResultsintegerNo5Maximum number of results (1-10)

Response: Returns a JSON array of matching libraries with their IDs, names, and descriptions.

find-docs Tool

Retrieve documentation content for a specific library from Context7.

Parameters:

ParameterTypeRequiredDefaultDescription
idstringYes-Library ID (obtained from library-search)
tokensintegerNo-Maximum number of tokens to retrieve
topicstringNo-Specific topic within the library to focus on

Response: Returns the documentation content as text, filtered by the specified topic and token limit if provided.

Project Operations

Tools for managing and switching between different project contexts.

Tool KeyDescriptionEnvironment VariableDefault
projects-listList all registered projects with their configuration detailsMCP_PROJECT_OPERATIONStrue
project-switchSwitch to a different project by path or aliasMCP_PROJECT_OPERATIONStrue
  • Projects must be registered using the project:add command before they can be switched to
  • The tool validates project existence before attempting to switch
  • Provides helpful error messages with available options when a project is not found
  • Supports both absolute and relative paths, with automatic path normalization

Note: Read more about project management in the Project Management section.

Always Available Tools

These tools are always available regardless of environment configuration:

Tool KeyDescription
project-structureGet information about the project structure
filesystem-operationsPerform basic filesystem queries
list-resourcesList all available resources
json-schemaGet JSON schema for various entities
document-contentGet document content by ID
list-toolsList all available tools (what you're using now)