directify-mcp 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools.js +118 -0
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -728,6 +728,119 @@ export const togglePage = {
|
|
|
728
728
|
},
|
|
729
729
|
};
|
|
730
730
|
|
|
731
|
+
// ─── Organizers ───
|
|
732
|
+
|
|
733
|
+
export const listOrganizers = {
|
|
734
|
+
name: 'list_organizers',
|
|
735
|
+
description: 'List all organizers in a directory, including their associated listings.',
|
|
736
|
+
inputSchema: {
|
|
737
|
+
type: 'object',
|
|
738
|
+
properties: {
|
|
739
|
+
directory_id: { type: 'string', description: 'Directory ID' },
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
handler: async ({ directory_id }) => {
|
|
743
|
+
const dir = resolveDirectory(directory_id);
|
|
744
|
+
const data = await api.get(`/directories/${dir}/organizers`);
|
|
745
|
+
return data.data || data;
|
|
746
|
+
},
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
export const getOrganizer = {
|
|
750
|
+
name: 'get_organizer',
|
|
751
|
+
description: 'Get details of a specific organizer, including their associated listings.',
|
|
752
|
+
inputSchema: {
|
|
753
|
+
type: 'object',
|
|
754
|
+
properties: {
|
|
755
|
+
directory_id: { type: 'string', description: 'Directory ID' },
|
|
756
|
+
organizer_id: { type: 'string', description: 'Organizer ID' },
|
|
757
|
+
},
|
|
758
|
+
required: ['organizer_id'],
|
|
759
|
+
},
|
|
760
|
+
handler: async ({ directory_id, organizer_id }) => {
|
|
761
|
+
const dir = resolveDirectory(directory_id);
|
|
762
|
+
const data = await api.get(`/directories/${dir}/organizers/${organizer_id}`);
|
|
763
|
+
return data.data || data;
|
|
764
|
+
},
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
export const createOrganizer = {
|
|
768
|
+
name: 'create_organizer',
|
|
769
|
+
description: 'Create a new organizer in a directory.',
|
|
770
|
+
inputSchema: {
|
|
771
|
+
type: 'object',
|
|
772
|
+
properties: {
|
|
773
|
+
directory_id: { type: 'string', description: 'Directory ID' },
|
|
774
|
+
name: { type: 'string', description: 'Organizer name (required)' },
|
|
775
|
+
slug: { type: 'string', description: 'URL slug (auto-generated from name if not provided)' },
|
|
776
|
+
description: { type: 'string', description: 'Short description (shown on cards and header)' },
|
|
777
|
+
content: { type: 'string', description: 'Long-form content (markdown supported, rendered as styled prose on profile page)' },
|
|
778
|
+
email: { type: 'string', description: 'Contact email address' },
|
|
779
|
+
phone: { type: 'string', description: 'Contact phone number' },
|
|
780
|
+
address: { type: 'string', description: 'Physical address' },
|
|
781
|
+
website_url: { type: 'string', description: 'Website URL' },
|
|
782
|
+
social_links: { type: 'object', description: 'Social links as key-value pairs (e.g. {Twitter: "https://..."})' },
|
|
783
|
+
user_id: { type: 'number', description: 'User ID to assign as organizer owner (for submitter dashboard access)' },
|
|
784
|
+
is_active: { type: 'boolean', description: 'Active status (default: true)' },
|
|
785
|
+
order: { type: 'number', description: 'Sort order (default: 0)' },
|
|
786
|
+
},
|
|
787
|
+
required: ['name'],
|
|
788
|
+
},
|
|
789
|
+
handler: async ({ directory_id, ...body }) => {
|
|
790
|
+
const dir = resolveDirectory(directory_id);
|
|
791
|
+
const data = await api.post(`/directories/${dir}/organizers`, body);
|
|
792
|
+
return data.data || data;
|
|
793
|
+
},
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
export const updateOrganizer = {
|
|
797
|
+
name: 'update_organizer',
|
|
798
|
+
description: 'Update an existing organizer.',
|
|
799
|
+
inputSchema: {
|
|
800
|
+
type: 'object',
|
|
801
|
+
properties: {
|
|
802
|
+
directory_id: { type: 'string', description: 'Directory ID' },
|
|
803
|
+
organizer_id: { type: 'string', description: 'Organizer ID to update' },
|
|
804
|
+
name: { type: 'string', description: 'Organizer name' },
|
|
805
|
+
slug: { type: 'string', description: 'URL slug' },
|
|
806
|
+
description: { type: 'string', description: 'Short description (shown on cards and header)' },
|
|
807
|
+
content: { type: 'string', description: 'Long-form content (markdown supported, rendered as styled prose on profile page)' },
|
|
808
|
+
email: { type: 'string', description: 'Contact email address' },
|
|
809
|
+
phone: { type: 'string', description: 'Contact phone number' },
|
|
810
|
+
address: { type: 'string', description: 'Physical address' },
|
|
811
|
+
website_url: { type: 'string', description: 'Website URL' },
|
|
812
|
+
social_links: { type: 'object', description: 'Social links as key-value pairs' },
|
|
813
|
+
user_id: { type: 'number', description: 'User ID to assign as organizer owner' },
|
|
814
|
+
is_active: { type: 'boolean', description: 'Active status' },
|
|
815
|
+
order: { type: 'number', description: 'Sort order' },
|
|
816
|
+
},
|
|
817
|
+
required: ['organizer_id'],
|
|
818
|
+
},
|
|
819
|
+
handler: async ({ directory_id, organizer_id, ...body }) => {
|
|
820
|
+
const dir = resolveDirectory(directory_id);
|
|
821
|
+
const data = await api.put(`/directories/${dir}/organizers/${organizer_id}`, body);
|
|
822
|
+
return data.data || data;
|
|
823
|
+
},
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
export const deleteOrganizer = {
|
|
827
|
+
name: 'delete_organizer',
|
|
828
|
+
description: 'Delete an organizer from a directory.',
|
|
829
|
+
inputSchema: {
|
|
830
|
+
type: 'object',
|
|
831
|
+
properties: {
|
|
832
|
+
directory_id: { type: 'string', description: 'Directory ID' },
|
|
833
|
+
organizer_id: { type: 'string', description: 'Organizer ID to delete' },
|
|
834
|
+
},
|
|
835
|
+
required: ['organizer_id'],
|
|
836
|
+
},
|
|
837
|
+
handler: async ({ directory_id, organizer_id }) => {
|
|
838
|
+
const dir = resolveDirectory(directory_id);
|
|
839
|
+
await api.delete(`/directories/${dir}/organizers/${organizer_id}`);
|
|
840
|
+
return { success: true, message: `Organizer ${organizer_id} deleted.` };
|
|
841
|
+
},
|
|
842
|
+
};
|
|
843
|
+
|
|
731
844
|
// ─── Export all tools ───
|
|
732
845
|
|
|
733
846
|
export const allTools = [
|
|
@@ -762,4 +875,9 @@ export const allTools = [
|
|
|
762
875
|
updatePage,
|
|
763
876
|
deletePage,
|
|
764
877
|
togglePage,
|
|
878
|
+
listOrganizers,
|
|
879
|
+
getOrganizer,
|
|
880
|
+
createOrganizer,
|
|
881
|
+
updateOrganizer,
|
|
882
|
+
deleteOrganizer,
|
|
765
883
|
];
|