Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "describe_sobject"
|
||||
description: "Use this tool to get detailed information about a specific Salesforce object's structure. This is crucial for understanding what fields are available, their types, and their properties. The tool returns comprehensive metadata including field types, picklist values, required fields, and field-level security settings. Use this before querying an object to ensure you're using valid field names and to understand the data types. For example, use this to discover all available fields on an Account or to find the valid values for a picklist field."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: sobject_name
|
||||
type: string
|
||||
description: "The API name of the Salesforce object to describe (e.g., 'Account', 'Contact', 'CustomObject__c'). The name is case-sensitive and must match exactly how it appears in Salesforce. You can use list_sobjects() to see all available object names."
|
||||
examples:
|
||||
- "Account"
|
||||
- "Contact"
|
||||
- "Opportunity"
|
||||
- "CustomObject__c"
|
||||
return:
|
||||
type: object
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Describe Account object"
|
||||
description: "Verify Account object description contains expected fields"
|
||||
arguments:
|
||||
- key: sobject_name
|
||||
value: "Account"
|
||||
@@ -0,0 +1,34 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "get_sobject"
|
||||
description: "Use this tool when you have a specific Salesforce record ID and need to retrieve all fields for that record. This is ideal for getting complete details about a known record, like when you have an Account ID from a previous query and need all its information. The tool requires both the object type (e.g., 'Account', 'Contact') and the record's unique ID. This is different from search or SOQL queries which find records based on field values - this tool is for direct record lookup by ID."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: sobject_name
|
||||
type: string
|
||||
description: "The API name of the Salesforce object (e.g., 'Account', 'Contact', 'CustomObject__c'). The name is case-sensitive and must match exactly how it appears in Salesforce. You can use list_sobjects() to see all available object names."
|
||||
examples:
|
||||
- "Account"
|
||||
- "Contact"
|
||||
- "Opportunity"
|
||||
- name: record_id
|
||||
type: string
|
||||
description: "The unique identifier (ID) of the record to retrieve. This is the 15 or 18 character ID assigned by Salesforce when the record is created. You can get these IDs from other queries or from the Salesforce UI."
|
||||
examples:
|
||||
- "001xx000003DIloAAG"
|
||||
- "003xx000004TmiAAE"
|
||||
return:
|
||||
type: object
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Get Account record structure"
|
||||
description: "Verify Account record has expected fields like Id, Name"
|
||||
arguments:
|
||||
- key: sobject_name
|
||||
value: "Account"
|
||||
- key: record_id
|
||||
value: "001Qy00000pxRDKIA2"
|
||||
@@ -0,0 +1,38 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "list_sobjects"
|
||||
description: "Use this tool to get a list of all Salesforce object names available in your org. This is essential for exploring your Salesforce instance and understanding what data you can access. The tool returns a simple list of object names (e.g., ['Account', 'Contact', 'Opportunity']). Use this before using other tools to ensure you're using valid object names. For example, use this to find custom objects in your org or to verify the exact spelling of standard objects. If you need detailed information about a specific object's structure, use the describe_sobject tool instead."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: filter
|
||||
type: string
|
||||
description: "Optional fuzzy filter to match object names (case-insensitive substring search). Examples: 'account', '__c' for custom objects, 'contact', etc. If not provided, all objects are returned."
|
||||
examples:
|
||||
- "account"
|
||||
- "__c"
|
||||
- "contact"
|
||||
default: null
|
||||
return:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Contains standard objects"
|
||||
description: "Verify standard Salesforce objects are present"
|
||||
arguments: []
|
||||
result_contains_all:
|
||||
- "Account"
|
||||
- "Contact"
|
||||
- "Opportunity"
|
||||
- name: "filter"
|
||||
description: "Verify the filter is applied"
|
||||
arguments:
|
||||
- key: filter
|
||||
value: "count"
|
||||
result_contains_all:
|
||||
- "Account"
|
||||
@@ -0,0 +1,28 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "search"
|
||||
description: "Use this tool when you want to quickly search for records across multiple Salesforce objects without knowing the exact field names. It's perfect for finding records by company names, people names, or locations. The search is case-insensitive and will match partial words. For example, searching for 'Acme' will find 'Acme Corp', 'Acme Inc', etc. across Account, Contact, Lead, and Opportunity records. If you need more control over which fields to search or which objects to include, use the sosl tool instead."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: search_term
|
||||
type: string
|
||||
description: "The term to search for. This will be matched against all searchable fields in the specified objects. For example, searching for 'Acme' will find records containing 'Acme', 'acme', 'ACME', etc."
|
||||
examples:
|
||||
- "Acme"
|
||||
- "John Smith"
|
||||
- "New York"
|
||||
return:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Basic search"
|
||||
description: "Verify search returns array of results"
|
||||
arguments:
|
||||
- key: search_term
|
||||
value: "Test"
|
||||
@@ -0,0 +1,43 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "soql"
|
||||
description: "Use this tool when you need to query specific fields from a single Salesforce object, similar to SQL. It's ideal for getting structured data like 'all accounts in New York' or 'all contacts for a specific account'. SOQL is more precise than search or SOSL because you specify exactly which fields you want. For example, use this when you need to get a list of accounts with their phone numbers and addresses, or when you need to find all opportunities over a certain amount. If you need to search across multiple objects or don't know the exact field names, use the search or sosl tools instead."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: query
|
||||
type: string
|
||||
description: "The SOQL query to execute. The query should follow SOQL syntax: SELECT field1, field2 FROM object_type [WHERE conditions] [ORDER BY field] [LIMIT n]. For example: 'SELECT Id, Name, Phone FROM Account WHERE BillingCity = 'New York' LIMIT 10'"
|
||||
examples:
|
||||
- "SELECT Id, Name FROM Account"
|
||||
- "SELECT Id, Name, Email FROM Contact WHERE AccountId = '001xx000003DIloAAG'"
|
||||
- "SELECT Id, Name, Amount, StageName FROM Opportunity WHERE IsWon = true ORDER BY Amount DESC LIMIT 5"
|
||||
return:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Basic Account query"
|
||||
description: "Verify SOQL query returns array of Account records"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "SELECT Id, Name FROM Account LIMIT 1"
|
||||
- name: "Query with LIMIT"
|
||||
description: "Verify SOQL query respects LIMIT clause"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "SELECT Id FROM Account LIMIT 2"
|
||||
- name: "Contact query structure"
|
||||
description: "Verify Contact query returns expected fields"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "SELECT Id, FirstName, LastName FROM Contact LIMIT 1"
|
||||
- name: "Results should not contain attributes"
|
||||
description: "Verify attributes field is filtered out from results"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "SELECT Id, Name FROM Account LIMIT 1"
|
||||
@@ -0,0 +1,43 @@
|
||||
mxcp: 1
|
||||
|
||||
tool:
|
||||
name: "sosl"
|
||||
description: "Use this tool when you need advanced search capabilities across multiple Salesforce objects. It's perfect for complex search scenarios like 'find all records containing this text in any field' or 'search only in name fields across accounts and contacts'. SOSL gives you fine-grained control over which objects to search and which fields to return. For example, use this when you need to find all records mentioning a specific product across accounts, contacts, and opportunities. If you just need a simple search, use the search tool instead. If you need to query specific fields from a single object, use the soql tool instead."
|
||||
language: python
|
||||
source:
|
||||
file: ../python/salesforce_endpoints.py
|
||||
parameters:
|
||||
- name: query
|
||||
type: string
|
||||
description: "The SOSL query to execute. The query should follow SOSL syntax: FIND {search_term} IN ALL FIELDS RETURNING object_type(field1, field2, ...). For example: 'FIND {Acme} IN ALL FIELDS RETURNING Account(Name, Phone), Contact(FirstName, LastName)'"
|
||||
examples:
|
||||
- "FIND {Acme} IN ALL FIELDS RETURNING Account(Name, Phone)"
|
||||
- "FIND {John} IN NAME FIELDS RETURNING Contact(FirstName, LastName, Email)"
|
||||
- "FIND {New York} IN ALL FIELDS RETURNING Account(Name, BillingCity), Lead(Company, City)"
|
||||
return:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
annotations:
|
||||
readOnlyHint: true
|
||||
tests:
|
||||
- name: "Basic SOSL search"
|
||||
description: "Verify SOSL search returns array of search results"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "FIND {Test} IN ALL FIELDS RETURNING Account(Name)"
|
||||
- name: "Multi-object search"
|
||||
description: "Verify SOSL can search across multiple objects"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "FIND {Test} IN ALL FIELDS RETURNING Account(Name), Contact(FirstName, LastName)"
|
||||
- name: "Name field search"
|
||||
description: "Verify SOSL can search in specific fields"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "FIND {Test} IN NAME FIELDS RETURNING Account(Name)"
|
||||
- name: "Search with specific fields"
|
||||
description: "Verify SOSL returns specified fields"
|
||||
arguments:
|
||||
- key: query
|
||||
value: "FIND {Test} IN ALL FIELDS RETURNING Account(Name, Phone)"
|
||||
Reference in New Issue
Block a user