list_conventions
Identify actual naming conventions from your codebase including prefixes, suffixes, conversions, and casing rules with real examples. Get accurate style guidance for new code or onboarding.
Instructions
List the project's actual naming conventions detected from code — prefix patterns (nb_, is_, has_), suffix patterns, conversion patterns (x_to_y), and casing rules, each with real examples from the codebase. More accurate than guessing from a few files. Use when asked about coding style, before writing new code, or when onboarding to a project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- pi/extensions/index.ts:362-387 (registration)The tool 'list_conventions' is registered in an iteration over all tool definitions. Each tool definition (including list_conventions) is registered via pi.registerTool with its name prefixed as 'ontomics_', and the execute handler calls out to an external MCP server (the ontomics binary) via McpClient.callTool.
for (const def of toolDefs()) { pi.registerTool({ name: `ontomics_${def.mcpName}`, label: def.label, description: def.description, promptSnippet: def.promptSnippet, promptGuidelines: [ "Use ontomics tools BEFORE grep/glob for semantic codebase questions.", ], parameters: def.parameters, async execute(_toolCallId, params, _signal, onUpdate, _ctx) { onUpdate?.({ content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }], }); try { const mcp = await getClient(); const text = await mcp.callTool(def.mcpName, cleanArgs(params)); return { content: [{ type: "text", text }] }; } catch (err) { throw new Error( `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`, ); } }, }); } - pi/extensions/index.ts:222-231 (schema)The schema/definition for 'list_conventions' tool: mcpName: 'list_conventions', label: 'List Conventions', description explaining it lists naming conventions, and empty parameters (Type.Object({})).
{ mcpName: "list_conventions", label: "List Conventions", description: "List the project's actual naming conventions detected from code — " + "prefix/suffix patterns, conversion patterns, casing rules.", promptSnippet: "ontomics_list_conventions: detected naming conventions with examples", parameters: Type.Object({}), }, - pi/extensions/index.ts:372-385 (handler)The execute handler for all tools (including list_conventions) — it calls the external MCP server via mcp.callTool(def.mcpName, cleanArgs(params)) and returns the text result. The actual logic lives in the ontomics binary process.
async execute(_toolCallId, params, _signal, onUpdate, _ctx) { onUpdate?.({ content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }], }); try { const mcp = await getClient(); const text = await mcp.callTool(def.mcpName, cleanArgs(params)); return { content: [{ type: "text", text }] }; } catch (err) { throw new Error( `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`, ); } },