swiftlys2/docs/api/releases/features/ai/
AI Tools

Give your AI live access to SwiftlyS2 data

SwiftlyS2 exposes its schema, entity, protobuf, game event, convar, Panorama, and API docs data to AI agents - so your coding assistant can look up the exact field, flag, or method it needs instead of guessing.

Connect an MCP client

SwiftlyS2 runs a Model Context Protocol server over Streamable HTTP. Add it to Claude Code, Claude Desktop, Cursor, or any other MCP-compatible client.

Endpoint
https://swiftlys2.net/api/mcp
mcpServers config
{
    "mcpServers": {
        "swiftlys2": {
            "url": "https://swiftlys2.net/api/mcp"
        }
    }
}

Available tools

Every domain gets the same three shapes: *_lookup for an exact name, *_list to browse without knowing a name yet, and *_search - the same engine behind that domain's search bar, filters and all. Each tool below is generated straight from its MCP registration, so the parameters shown always match what the server accepts.

site_searchsearches everything

Search across everything at once - schema, entities, protobuf, game events, convars, docs, and API docs - exactly like the site's top search bar. Use this when you don't know which specific tool to reach for, then follow up with the matching *_lookup tool for full detail.

site_search

Search across everything at once - schema, entities, protobuf, game events, convars, docs, and API docs - exactly like the site's top search bar. Use this when you don't know which specific tool to reach for, then follow up with the matching *_lookup tool for full detail.

qstringSubstring to match across every source.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
Schema
schema_lookup

Resolve a Source 2 schema class or enum by name and return its fields/members plus a link to the schema viewer. Accepts either the raw name or its C# interface name. Project is auto-resolved if omitted.

namestringClass or enum name, raw or C#, e.g. CBaseEntity
projectstringoptionalSchema project bucket, e.g. server. Auto-resolved if omitted.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
schema_list

Browse the schema dump. Without a project, returns every project with its class/enum counts. With a project, returns the class and enum names in it (capped; use schema_search to narrow further).

projectstringoptionalProject to list classes/enums for, e.g. server.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
schema_search

Search across all schema fields and enum values by substring, exactly like the schema viewer's search bar. Supports the same filters: field name, type, byte offset, enum value, and networked flag.

qstringoptionalSubstring to match in field/type names.
fieldstringoptionalFilter: field name contains this.
typestringoptionalFilter: field type contains this.
offsetstringoptionalFilter: exact byte offset (decimal or 0x-hex).
enumvaluestringoptionalFilter: exact enum member value (decimal or 0x-hex).
networkedbooleanoptionalFilter: whether the field is networked.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
Entities
entity_lookup

Resolve a Source 2 entity class by name and return its datamap (inputs/outputs/members) plus a link to the entity viewer. Accepts either the raw class name or its C# interface name.

classNamestringEntity class name, raw (CCSPlayerPawn) or C# interface name
gameenum(cs2)default: "cs2"Game id. One of: cs2.
entity_list

List entity class names. Pass a prefix to narrow it down (entity classes aren't grouped into modules); without one, only the first page is returned - use entity_search for substring matches anywhere in the name.

prefixstringoptionalCase-insensitive prefix to filter class names by.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
entity_search

Search entity classes and their input/output/member datamap fields by substring, exactly like the entity viewer's search bar.

qstringoptionalSubstring to match in class or field names.
kindenum(input|output|member)optionalFilter datamap field matches to this kind.
fieldstringoptionalFilter: field name contains this.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
Protobuf
protobuf_lookup

Resolve a protobuf message or enum by name and return its fields/values plus a link to the protobuf viewer. Accepts either the raw proto name or its C# name (dots replaced with underscores). File is auto-resolved if omitted and the name is unambiguous.

namestringMessage or enum name, raw or C#, e.g. CMsgSayText2
filestringoptionalProto file name. Auto-resolved if omitted and unambiguous.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
protobuf_list

Browse the protobuf dump. Without filters, returns every module with its message/enum count. With a module, lists the messages/enums in it. With a file, lists the messages/enums declared in that exact file.

modulestringoptionalModule to list contents for.
filestringoptionalProto file to list contents for.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
protobuf_search

Search protobuf messages and enums by substring (or numeric net message id), exactly like the protobuf viewer's search bar. Supports the same filters: kind, file, and module.

qstringoptionalSubstring or numeric net message id to match.
kindenum(message|enum)optionalFilter by kind.
filestringoptionalFilter: file name contains this.
modulestringoptionalFilter: exact module name.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
Game events
gameevent_lookup

Resolve a game event by name and return its fields plus a link to the game events viewer. Accepts either the raw name (player_death) or its C# interface name (EventPlayerDeath).

namestringGame event name, raw (player_death) or C# (EventPlayerDeath)
gameenum(cs2)default: "cs2"Game id. One of: cs2.
gameevent_list

Browse the game events dump. Without a file, returns every gameevents file with its event count. With a file, lists the events declared in it.

filestringoptionalGameevents file to list events for.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
gameevent_search

Search game events by name, field name, or hex hash, exactly like the game events viewer's search bar.

qstringoptionalSubstring or hex hash to match.
fieldstringoptionalFilter: event has a field matching this.
filestringoptionalFilter: event is declared in this file.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
ConVars
convar_lookup

Resolve a console variable or console command by exact name (e.g. sv_cheats) and return its flags/description plus a link to the convars viewer. Module is auto-resolved if omitted.

namestringConVar or ConCommand name, e.g. sv_cheats
modulestringoptionalModule the entry belongs to. Auto-resolved if omitted.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
convar_list

Browse the convars dump. Without a module, returns every module with its entry count. With a module, lists the convars/concommands in it.

modulestringoptionalModule to list entries for.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
convar_search

Search convars and concommands exactly like the convars viewer's filter panel: substring on name, kind, and include/exclude tag filters on module, engine flag (lowercase, e.g. cheat, replicated, notify), and attribute (has_default, has_min, has_max, has_callback, has_completion_callback).

qstringoptionalSubstring to match in the name.
kindenum(all|convar|concommand)default: "all"
modulesIncludearrayoptionalOnly these modules.
modulesExcludearrayoptionalExclude these modules.
flagsIncludearrayoptionalOnly entries with all of these engine flags, e.g. cheat.
flagsExcludearrayoptionalExclude entries with any of these engine flags.
attrsIncludearrayoptionalOnly entries with all of these attributes.
attrsExcludearrayoptionalExclude entries with any of these attributes.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
Panorama
panorama_lookup

Resolve a Panorama (Source 2 UI) CSS property by name and return its description plus a link to the Panorama viewer.

namestringPanorama property name, e.g. box-shadow
gameenum(cs2)default: "cs2"Game id. One of: cs2.
panorama_list

List every Panorama CSS property name known for a game.

gameenum(cs2)default: "cs2"Game id. One of: cs2.
panorama_search

Search Panorama CSS property names, exactly like the Panorama viewer's search bar.

qstringSubstring to match against property names.
gameenum(cs2)default: "cs2"Game id. One of: cs2.
API docs
apidocs_lookup

Resolve a SwiftlyS2 C# API type by exact name (e.g. IPlayerManagerService) and return its declaration/members plus a link to the API docs. Optionally narrow to a single member (method/property/field).

namestringType name, e.g. IPlayerManagerService
memberstringoptionalMember name to narrow the result to, e.g. SendCenterHTML
branchenum(stable|beta)default: "stable"API docs branch.
apidocs_list

Browse the SwiftlyS2 C# API docs. Without a category, returns every category with its types. With a category, returns just the types in it.

categorystringoptionalCategory slug to list types for.
branchenum(stable|beta)default: "stable"API docs branch.
apidocs_search

Search API type names, member names, and summaries by substring, exactly like the API docs search bar.

qstringSubstring to match in type/member names or summaries.
branchenum(stable|beta)default: "stable"API docs branch.
Docs
docs_list

List every SwiftlyS2 docs page with its title and URL.

docs_search

Search docs page bodies and headings by substring, exactly like the docs sidebar search bar. Returns matching pages with the heading/snippet and a deep link.

qstringSubstring to match.

Lookups auto-resolve what they can (schema project, protobuf file, convar module) from just a name. List/search results are capped and report a total + truncated flag rather than ever dumping an entire dump into context.

llms.txt

A plain-text index of the docs and API surface, following the llms.txt convention - for agents that ingest context directly instead of calling tools.

/llms.txt

Short index: links to every doc page, the API reference, the data viewers, and this MCP server.

/llms-full.txt

The full index plus the raw markdown of every doc page inlined, for one-shot ingestion.

Structured references in docs

Docs pages can link straight into the viewers with a name - no need to know the project, module, or file it lives in. These render as verified links (or a visible warning if the name doesn't exist), which also makes the docs themselves easier for an LLM to ground against real data.

<SchemaRef name="CBaseEntity" />
<EntityRef name="CCSPlayerPawn" />
<ProtobufRef name="CMsgSayText2" />
<GameEventRef name="player_death" />
<ConvarRef name="sv_cheats" />
<ApiRef name="IPlayerManagerService" member="SendCenterHTML" />