Get Custom Rule
get_custom_ruleRetrieve a specific custom rule by UUID to access its name, tag-slug, type, configuration, target, and active status.
Instructions
Get one custom rule by UUID with name, tag-slug, type, config object, target, active flag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_id | Yes | Rule UUID. |
Implementation Reference
- Handler: calls ctx.api.getCustomRule with the rule_id, maps API errors via mapApiError, and returns the CustomRuleResponse on success
handler: async (input, ctx): Promise<Result<GetCustomRuleOutput, ToolError>> => { const result = await ctx.api.getCustomRule(input.rule_id); if (result.isErr()) return err(mapApiError(result.error)); return ok(result.value); }, - Input schema: expects a single 'rule_id' as a UUID string
const GetCustomRuleInputShape = { rule_id: z.string().uuid().describe("Rule UUID.") } as const; type GetCustomRuleInputShape = typeof GetCustomRuleInputShape; - Output type alias: CustomRuleResponse (contains id, organization_id, name, tag_slug, rule_type, config, target, is_active, created_at)
export type GetCustomRuleOutput = CustomRuleResponse; - src/application/tool-registry.ts:61-61 (registration)Import of getCustomRuleTool in the central registry
import { getCustomRuleTool } from "./tools/custom-rules/get-custom-rule.tool.js"; - src/application/tool-registry.ts:161-161 (registration)Registration: getCustomRuleTool is registered under the 'custom rules' group in registerAllTools
register(getCustomRuleTool);