Index
facade
AXM MCP facade — compact tool surface over standard MCP primitives.
Instead of registering every discovered axm.tools entry point as an
individual MCP tool (one JSON-Schema each in tools/list), the facade
exposes four meta-tools — axm_search / axm_describe / axm_call /
axm_capabilities — plus a small hot path of frequently-used tools that
opt in via expose_directly = True. Everything else is reachable through
axm_search -> axm_describe -> axm_call, keeping the per-session
tools/list payload small without depending on any client-specific
deferred-loading mechanism.
The catalog is built from the same discover_tools() dict the server
already holds — it does not re-import tools.
ToolCatalog
Searchable index over discovered axm.tools entries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tools
|
dict[str, ToolEntry]
|
The |
required |
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
| Python | |
|---|---|
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | |
acall(name, arguments=None)
async
Execute name through the lock-aware async wrapper.
The HTTP-mode entry point: it awaits the async wrapper, so the
per-key lock (git_* by repo path, protocol_* by session) is
held and the sync tool body runs on a worker thread via
asyncio.to_thread — the event loop of the shared server is never
blocked. In stdio mode the async wrapper simply runs the tool inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name. |
required |
arguments
|
dict[str, object] | None
|
Keyword arguments for the tool. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The rendered text output (same contract as :meth: |
Raises:
| Type | Description |
|---|---|
UnknownToolError
|
If name is not in the catalog. |
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
call(name, arguments=None)
Execute name synchronously and return its text output.
Delegates to the same sync wrapper the direct MCP path registers
(built by :func:axm_mcp.wrapping.build_wrappers), so axm_call
inherits its full contract: kwarg unwrapping, implicit-path warning,
tracing, exception flattening (a raised ValueError/OSError
becomes {success: False, error: ...} — never a raw MCP protocol
error), and the success-only text short-circuit. This is the
single execution path.
The per-key concurrency lock (git_*/protocol_* in HTTP mode)
is only held via :meth:acall; call is the sync entry used in
stdio mode and by tests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name. |
required |
arguments
|
dict[str, object] | None
|
Keyword arguments for the tool. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The tool's |
str
|
readable rendering of the shared flattened envelope. |
Raises:
| Type | Description |
|---|---|
UnknownToolError
|
If name is not in the catalog. |
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
capabilities(domain=None)
Group tool names by domain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str | None
|
When given, return only that domain's tools. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, list[str]]
|
|
dict[str, list[str]]
|
under the |
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
describe(name)
Return the full invocation contract for name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, object]
|
|
dict[str, object]
|
param is |
Raises:
| Type | Description |
|---|---|
UnknownToolError
|
If name is not in the catalog. |
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
hot_path()
Names of tools opting into direct MCP exposure (expose_directly).
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
names()
param_hint(name)
Human-readable list of accepted params for name (for error text).
Source code in packages/axm-mcp/src/axm_mcp/facade/catalog.py
search(query, domain=None, limit=_DEFAULT_LIMIT)
Find tools whose name, summary, tags or domain match query.
Matching is case-insensitive substring (the deliberately-simple v1; tags carry discovery quality). An empty query lists everything (optionally scoped by domain), which makes the facade browsable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Substring to look for. Empty matches all. |
required |
domain
|
str | None
|
Optional exact-match domain filter. |
None
|
limit
|
int
|
Maximum number of results. |
_DEFAULT_LIMIT
|
Returns:
| Type | Description |
|---|---|
list[dict[str, object]]
|
A list of |