sf_code_examples
Find working Salesforce code examples by topic, language, and domain. Returns snippets with source context for copy-paste solutions and learning patterns.
Instructions
Find working code examples from Salesforce documentation. Returns code snippets with language, source file, and surrounding context. Great for learning patterns and copy-paste solutions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max snippets to return (default 5) | |
| topic | Yes | Topic to find code for (e.g. 'batch apex', 'REST callout', 'SOQL aggregate') | |
| domain | No | Optional domain filter (e.g. 'apex-guide', 'lwc') | |
| language | No | Optional language filter (e.g. 'apex', 'javascript', 'soql', 'json') |